summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-07-15 06:26:35 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-07-15 06:26:35 +0000
commita83bba46b38c255e18ebbe1262ea339431a1ef94 (patch)
tree4baee3385f2ea30c883f72696614a01ec1070a35 /lib
parent678f9e05c949bc565b736b0bb4337bffb0f3c687 (diff)
downloadllvm-a83bba46b38c255e18ebbe1262ea339431a1ef94.tar.gz
llvm-a83bba46b38c255e18ebbe1262ea339431a1ef94.tar.bz2
llvm-a83bba46b38c255e18ebbe1262ea339431a1ef94.tar.xz
Reverting r135232. It's causing infinite looping in DbgScope::openInsnRange.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135254 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index b7fc41b77b..03fb8d1fa3 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/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));