llvm/llvm/lib/CodeGen/MachineStripDebug.cpp

//===- MachineStripDebug.cpp - Strip debug info ---------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
///
/// \file This removes debug info from everything. It can be used to ensure
/// tests can be debugified without affecting the output MIR.
//===----------------------------------------------------------------------===//

#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Transforms/Utils/Debugify.h"

#define DEBUG_TYPE

usingnamespacellvm;

namespace {
cl::opt<bool>
    OnlyDebugifiedDefault("mir-strip-debugify-only",
                          cl::desc("Should mir-strip-debug only strip debug "
                                   "info from debugified modules by default"),
                          cl::init(true));

struct StripDebugMachineModule : public ModulePass {};
char StripDebugMachineModule::ID =;

} // end anonymous namespace

INITIALIZE_PASS_BEGIN(StripDebugMachineModule, DEBUG_TYPE,
                      "Machine Strip Debug Module", false, false)
INITIALIZE_PASS_END(StripDebugMachineModule, DEBUG_TYPE,
                    "Machine Strip Debug Module", false, false)

ModulePass *llvm::createStripDebugMachineModulePass(bool OnlyDebugified) {}