diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-07-15 06:26:35 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-07-15 06:26:35 +0000 |
commit | b46f3e24ba8eaaa79c98b4582caa328eea0e7c15 (patch) | |
tree | adc3758f24379ea9234d9dbbf72c3fdcbb9c7862 /llvm/lib | |
parent | af1783f9877b341ab8f2de87170054898b21d370 (diff) | |
download | bcm5719-llvm-b46f3e24ba8eaaa79c98b4582caa328eea0e7c15.tar.gz bcm5719-llvm-b46f3e24ba8eaaa79c98b4582caa328eea0e7c15.zip |
Reverting r135232. It's causing infinite looping in DbgScope::openInsnRange.
llvm-svn: 135254
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index b7fc41b77b7..03fb8d1fa31 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1587,22 +1587,18 @@ DbgScope *DwarfDebug::getOrCreateDbgScope(DebugLoc DL) { } 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 *DwarfDebug::findDbgScope(DebugLoc DL) { 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)); |