[llvm-commits] [llvm] r98032 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Chris Lattner sabre at nondot.org
Mon Mar 8 17:52:43 PST 2010


Author: lattner
Date: Mon Mar  8 19:52:43 2010
New Revision: 98032

URL: http://llvm.org/viewvc/llvm-project?rev=98032&view=rev
Log:
remove a useless optimization: now that label replacement never
happens, the start/end of a scope can never be the same.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=98032&r1=98031&r2=98032&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Mar  8 19:52:43 2010
@@ -1370,10 +1370,6 @@
   assert(!MMI->isLabelDeleted(EndID) &&
          "Invalid end label for an inlined scope!");
   
-  // Ignore empty scopes.
-  if (StartID == EndID && StartID != 0)
-    return NULL;
-
   DIE *ScopeDIE = new DIE(dwarf::DW_TAG_lexical_block);
   if (Scope->isAbstractScope())
     return ScopeDIE;
@@ -1398,9 +1394,6 @@
          "Invalid starting label for an inlined scope!");
   assert(!MMI->isLabelDeleted(EndID) &&
          "Invalid end label for an inlined scope!");
-  // Ignore empty scopes.
-  if (StartID == EndID)
-    return NULL;
   if (!Scope->getScopeNode())
     return NULL;
   DIScope DS(Scope->getScopeNode());





More information about the llvm-commits mailing list