Skip to content

Commit deb8ebf

Browse files
arsenmyuxuanchen1997
authored andcommitted
CodeGen: Remove -disable-debug-info-print cl::opt (#100319)
Summary: 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. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250578
1 parent a146e3b commit deb8ebf

File tree

4 files changed

+4
-89
lines changed

4 files changed

+4
-89
lines changed

llvm/lib/CodeGen/MachineModuleInfo.cpp

Lines changed: 2 additions & 18 deletions
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

Lines changed: 0 additions & 50 deletions
This file was deleted.

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

Lines changed: 0 additions & 19 deletions
This file was deleted.

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

Lines changed: 2 additions & 2 deletions
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)