From af1d2b9fb1c6065d3a4611f086b8c83a0c05795c Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Thu, 25 Jul 2024 16:39:39 +0400 Subject: CodeGen: Remove -disable-debug-info-print cl::opt (#100319) This was first introduced way back in in 2010 by 6c74a872a8d34d41b751efb68e335cbe91b5a5cc, and has little evidence of use. Only one test attempts to make use of this, but it's also redundant since it's also using strip to drop debug info anyway (and that also makes the test buggy, since it's intended to test with and without debug info). The other tests using it were only added to test the option after discovering it was untested and moved, in later commits. --- llvm/lib/CodeGen/MachineModuleInfo.cpp | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp') diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp index b950f4f..088e7602 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp @@ -7,8 +7,6 @@ //===----------------------------------------------------------------------===// #include "llvm/CodeGen/MachineModuleInfo.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/StringRef.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/Passes.h" #include "llvm/IR/Constants.h" @@ -16,25 +14,13 @@ #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" #include "llvm/InitializePasses.h" -#include "llvm/MC/MCContext.h" -#include "llvm/Pass.h" -#include "llvm/Support/CommandLine.h" -#include "llvm/Support/ErrorHandling.h" #include "llvm/Target/TargetLoweringObjectFile.h" #include "llvm/Target/TargetMachine.h" -#include #include -#include -#include -#include using namespace llvm; using namespace llvm::dwarf; -static cl::opt - DisableDebugInfoPrinting("disable-debug-info-print", cl::Hidden, - cl::desc("Disable debug info printing")); - // Out of line virtual method. MachineModuleInfoImpl::~MachineModuleInfoImpl() = default; @@ -224,8 +210,7 @@ bool MachineModuleInfoWrapperPass::doInitialization(Module &M) { Ctx.diagnose( DiagnosticInfoSrcMgr(SMD, M.getName(), IsInlineAsm, LocCookie)); }); - MMI.DbgInfoAvailable = !DisableDebugInfoPrinting && - !M.debug_compile_units().empty(); + MMI.DbgInfoAvailable = !M.debug_compile_units().empty(); return false; } @@ -250,7 +235,6 @@ MachineModuleAnalysis::run(Module &M, ModuleAnalysisManager &) { Ctx.diagnose( DiagnosticInfoSrcMgr(SMD, M.getName(), IsInlineAsm, LocCookie)); }); - MMI.DbgInfoAvailable = - !DisableDebugInfoPrinting && !M.debug_compile_units().empty(); + MMI.DbgInfoAvailable = !M.debug_compile_units().empty(); return Result(MMI); } -- cgit v1.1