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

Evan Cheng evan.cheng at apple.com
Thu Jul 14 23:26:35 PDT 2011


Author: evancheng
Date: Fri Jul 15 01:26:35 2011
New Revision: 135254

URL: http://llvm.org/viewvc/llvm-project?rev=135254&view=rev
Log:
Reverting r135232. It's causing infinite looping in DbgScope::openInsnRange.

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=135254&r1=135253&r2=135254&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Jul 15 01:26:35 2011
@@ -1587,22 +1587,18 @@
   }
 
   getOrCreateAbstractScope(Scope);
-  DbgScope *WScope = NULL;
-  const MDNode *Key = InlinedAt;
-  if (const MDNode *Nest = DILocation(InlinedAt).getOrigLocation())
-    Key = Nest;
-  WScope = DbgScopeMap.lookup(Key);
+  DbgScope *WScope = DbgScopeMap.lookup(InlinedAt);
   if (WScope)
     return WScope;
 
   WScope = new DbgScope(NULL, DIDescriptor(Scope), InlinedAt);
-  DbgScopeMap[Key] = WScope;
+  DbgScopeMap.insert(std::make_pair(InlinedAt, WScope));
   DbgScope *Parent =
     getOrCreateDbgScope(DebugLoc::getFromDILocation(InlinedAt));
   WScope->setParent(Parent);
   Parent->addScope(WScope);
 
-  ConcreteScopes[Key] = WScope;
+  ConcreteScopes[InlinedAt] = WScope;
 
   return WScope;
 }
@@ -2087,12 +2083,8 @@
 
   DbgScope *Scope = NULL;
   LLVMContext &Ctx = Asm->MF->getFunction()->getContext();
-  if (const MDNode *IA = DL.getInlinedAt(Ctx)) {
-    const MDNode *Key = IA;
-    if (const MDNode *Nest = DILocation(IA).getOrigLocation())
-      Key = Nest;
-    Scope = ConcreteScopes.lookup(Key);
-  }
+  if (const MDNode *IA = DL.getInlinedAt(Ctx))
+    Scope = ConcreteScopes.lookup(IA);
   if (Scope == 0)
     Scope = DbgScopeMap.lookup(DL.getScope(Ctx));
 





More information about the llvm-commits mailing list