diff options
author | Devang Patel <dpatel@apple.com> | 2011-07-14 01:52:45 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-07-14 01:52:45 +0000 |
commit | 49c19f778b62df6f2a28798113a17d5cb3582bda (patch) | |
tree | 6693b735b7c21a6cc9c01baa397c228248e6d62b /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 3ff25514ce24a521fc9524eefb257a1f5f262d84 (diff) |
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135127 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index d38f578c05..7a3cc8f835 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/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; } |