summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-07-14 01:52:45 +0000
committerDevang Patel <dpatel@apple.com>2011-07-14 01:52:45 +0000
commitd5234bbced075ba5110ddba00567e15fb1ce0dcf (patch)
tree82aed0caa215377fbcba49275b5e3d3b3a964439 /llvm/lib
parent15cd5a3f1202e8c44b82ffba990f1388d54ab7f0 (diff)
downloadbcm5719-llvm-d5234bbced075ba5110ddba00567e15fb1ce0dcf.tar.gz
bcm5719-llvm-d5234bbced075ba5110ddba00567e15fb1ce0dcf.zip
Simplify.
llvm-svn: 135127
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index d38f578c053..7a3cc8f835a 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1582,19 +1582,9 @@ DbgScope *DwarfDebug::getOrCreateDbgScope(DebugLoc DL, LLVMContext &Ctx) {
getOrCreateDbgScope(DebugLoc::getFromDILexicalBlock(Scope), Ctx);
WScope->setParent(Parent);
Parent->addScope(WScope);
- }
-
- if (!WScope->getParent()) {
- StringRef SPName = DISubprogram(Scope).getLinkageName();
- // We used to check only for a linkage name, but that fails
- // since we began omitting the linkage name for private
- // functions. The new way is to check for the name in metadata,
- // but that's not supported in old .ll test cases. Ergo, we
- // check both.
- if (SPName == Asm->MF->getFunction()->getName() ||
- DISubprogram(Scope).getFunction() == Asm->MF->getFunction())
- CurrentFnDbgScope = WScope;
- }
+ } else if (DIDescriptor(Scope).isSubprogram()
+ && DISubprogram(Scope).describes(Asm->MF->getFunction()))
+ CurrentFnDbgScope = WScope;
return WScope;
}
OpenPOWER on IntegriCloud