eliminate DwarfDebug::shouldEmit, which is the same now as MMI::hasDebugInfo
authorChris Lattner <sabre@nondot.org>
Mon, 5 Apr 2010 03:52:55 +0000 (03:52 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 5 Apr 2010 03:52:55 +0000 (03:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100386 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.h

index 490a8662fd2ea5b8ab205091f62e401730a81f0f..6da94a4331b3f3c0f0400ddbabe0a32eb619508b 100644 (file)
@@ -301,7 +301,7 @@ DbgScope::~DbgScope() {
 
 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 @@ void DwarfDebug::beginModule(Module *M) {
   
   if (!HasDebugInfo) return;
 
-  shouldEmit = true;
-  
   // Tell MMI that we have debug info.
   MMI->setDebugInfoAvailability(true);
   
@@ -2265,7 +2263,7 @@ bool DwarfDebug::extractScopeInformation() {
 /// 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 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
 /// 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);
index b38e485117a02a34ac00e60535e13eaf84fcf5c5..21b406eeabb7f53f397fba702f50c1a573399b85 100644 (file)
@@ -126,10 +126,6 @@ private:
   ///
   std::vector<std::vector<SrcLineInfo> > SectionSourceLines;
 
-  /// shouldEmit - Flag to indicate if debug information should be emitted.
-  ///
-  bool shouldEmit;
-
   // CurrentFnDbgScope - Top level scope for the current function.
   //
   DbgScope *CurrentFnDbgScope;
@@ -520,10 +516,6 @@ public:
   DwarfDebug(AsmPrinter *A);
   virtual ~DwarfDebug();
 
-  /// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should
-  /// be emitted.
-  bool ShouldEmitDwarfDebug() const { return shouldEmit; }
-
   /// beginModule - Emit all Dwarf sections that should come prior to the
   /// content.
   void beginModule(Module *M);