eliminate DwarfDebug::shouldEmit, which is the same now as MMI::hasDebugInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100386 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 490a866..6da94a4 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -301,7 +301,7 @@
DwarfDebug::DwarfDebug(AsmPrinter *A)
: Asm(A), MMI(Asm->MMI), ModuleCU(0),
- AbbreviationsSet(InitAbbreviationsSetSize), shouldEmit(false),
+ AbbreviationsSet(InitAbbreviationsSetSize),
CurrentFnDbgScope(0), DebugTimer(0) {
NextStringPoolNumber = 0;
@@ -1815,8 +1815,6 @@
if (!HasDebugInfo) return;
- shouldEmit = true;
-
// Tell MMI that we have debug info.
MMI->setDebugInfoAvailability(true);
@@ -2265,7 +2263,7 @@
/// beginFunction - Gather pre-function debug information. Assumes being
/// emitted immediately after the function entry point.
void DwarfDebug::beginFunction(const MachineFunction *MF) {
- if (!ShouldEmitDwarfDebug()) return;
+ if (!MMI->hasDebugInfo()) return;
TimeRegion Timer(DebugTimer);
if (!extractScopeInformation())
@@ -2300,7 +2298,7 @@
/// endFunction - Gather and emit post-function debug information.
///
void DwarfDebug::endFunction(const MachineFunction *MF) {
- if (!ShouldEmitDwarfDebug()) return;
+ if (!MMI->hasDebugInfo()) return;
if (DbgScopeMap.empty()) return;
TimeRegion Timer(DebugTimer);