Skip to content

Commit af1d2b9

Browse files
authored
CodeGen: Remove -disable-debug-info-print cl::opt (#100319)
This was first introduced way back in in 2010 by 6c74a87, 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.
1 parent a466db2 commit af1d2b9

File tree

4 files changed

+4
-89
lines changed

4 files changed

+4
-89
lines changed

llvm/lib/CodeGen/MachineModuleInfo.cpp

+2-18
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,20 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "llvm/CodeGen/MachineModuleInfo.h"
10-
#include "llvm/ADT/DenseMap.h"
11-
#include "llvm/ADT/StringRef.h"
1210
#include "llvm/CodeGen/MachineFunction.h"
1311
#include "llvm/CodeGen/Passes.h"
1412
#include "llvm/IR/Constants.h"
1513
#include "llvm/IR/DiagnosticInfo.h"
1614
#include "llvm/IR/LLVMContext.h"
1715
#include "llvm/IR/Module.h"
1816
#include "llvm/InitializePasses.h"
19-
#include "llvm/MC/MCContext.h"
20-
#include "llvm/Pass.h"
21-
#include "llvm/Support/CommandLine.h"
22-
#include "llvm/Support/ErrorHandling.h"
2317
#include "llvm/Target/TargetLoweringObjectFile.h"
2418
#include "llvm/Target/TargetMachine.h"
25-
#include <algorithm>
2619
#include <cassert>
27-
#include <memory>
28-
#include <utility>
29-
#include <vector>
3020

3121
using namespace llvm;
3222
using namespace llvm::dwarf;
3323

34-
static cl::opt<bool>
35-
DisableDebugInfoPrinting("disable-debug-info-print", cl::Hidden,
36-
cl::desc("Disable debug info printing"));
37-
3824
// Out of line virtual method.
3925
MachineModuleInfoImpl::~MachineModuleInfoImpl() = default;
4026

@@ -224,8 +210,7 @@ bool MachineModuleInfoWrapperPass::doInitialization(Module &M) {
224210
Ctx.diagnose(
225211
DiagnosticInfoSrcMgr(SMD, M.getName(), IsInlineAsm, LocCookie));
226212
});
227-
MMI.DbgInfoAvailable = !DisableDebugInfoPrinting &&
228-
!M.debug_compile_units().empty();
213+
MMI.DbgInfoAvailable = !M.debug_compile_units().empty();
229214
return false;
230215
}
231216

@@ -250,7 +235,6 @@ MachineModuleAnalysis::run(Module &M, ModuleAnalysisManager &) {
250235
Ctx.diagnose(
251236
DiagnosticInfoSrcMgr(SMD, M.getName(), IsInlineAsm, LocCookie));
252237
});
253-
MMI.DbgInfoAvailable =
254-
!DisableDebugInfoPrinting && !M.debug_compile_units().empty();
238+
MMI.DbgInfoAvailable = !M.debug_compile_units().empty();
255239
return Result(MMI);
256240
}

llvm/test/CodeGen/Generic/disable-debug-info-print.ll

-50
This file was deleted.

llvm/test/CodeGen/X86/disable-debug-info-print-codeview.ll

-19
This file was deleted.

llvm/test/CodeGen/X86/frame-order.ll

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
; RUN: llc -mtriple=x86_64-linux-gnueabi -disable-debug-info-print < %s | FileCheck %s
2-
; RUN: opt -passes=strip -S < %s | llc -mtriple=x86_64-linux-gnueabi -disable-debug-info-print | FileCheck %s
1+
; RUN: llc -mtriple=x86_64-linux-gnueabi < %s | FileCheck %s
2+
; RUN: opt -passes=strip -S < %s | llc -mtriple=x86_64-linux-gnueabi | FileCheck %s
33

44
; This test checks if the code is generated correctly with and without debug info.
55

0 commit comments

Comments
 (0)