summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-11-11 00:31:36 +0000
committerDevang Patel <dpatel@apple.com>2009-11-11 00:31:36 +0000
commit78319c67ca3745e220b5b5686854c43fe7e96fbc (patch)
tree9dcafd753759f18b746ea376d27fae246696e6ca /llvm/lib/CodeGen
parent9806e4ab200bf85851c119a7a4b4df55e2c581af (diff)
downloadbcm5719-llvm-78319c67ca3745e220b5b5686854c43fe7e96fbc.tar.gz
bcm5719-llvm-78319c67ca3745e220b5b5686854c43fe7e96fbc.zip
Do not assume first function scope seen represents current function.
llvm-svn: 86771
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 75b42cd6989..e7e596db054 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1347,8 +1347,9 @@ DbgScope *DwarfDebug::getUpdatedDbgScope(MDNode *N, const MachineInstr *MI,
NScope->setFirstInsn(MI);
if (!Parent && !InlinedAt) {
- assert (!CurrentFnDbgScope && "Unexpected function scope!");
- CurrentFnDbgScope = NScope;
+ StringRef SPName = DISubprogram(N).getLinkageName();
+ if (SPName == MF->getFunction()->getName())
+ CurrentFnDbgScope = NScope;
}
if (GetConcreteScope) {
OpenPOWER on IntegriCloud