summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-06-01 20:18:46 +0000
committerBill Wendling <isanbard@gmail.com>2009-06-01 20:18:46 +0000
commit8fff19ba556b8a61545fa52fdac9f04fbbe74e11 (patch)
tree71763a6626a52f9c27a4d30e99948528450ac8de /lib
parent70459bef9ccd73b3a2a44fdd62f2509861112745 (diff)
downloadllvm-8fff19ba556b8a61545fa52fdac9f04fbbe74e11.tar.gz
llvm-8fff19ba556b8a61545fa52fdac9f04fbbe74e11.tar.bz2
llvm-8fff19ba556b8a61545fa52fdac9f04fbbe74e11.tar.xz
Accidental commit. This isn't ready for prime time just yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72699 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 6b6d3b3c91..25217b0880 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -969,6 +969,12 @@ DbgScope *DwarfDebug::getOrCreateScope(GlobalVariable *V) {
DbgScope *Parent = NULL;
DIBlock Block(V);
+ // Don't create a new scope if we already created one for an inlined function.
+ DenseMap<const GlobalVariable *, DbgScope *>::iterator
+ II = AbstractInstanceRootMap.find(V);
+ if (II != AbstractInstanceRootMap.end())
+ return LexicalScopeStack.back();
+
if (!Block.isNull()) {
DIDescriptor ParentDesc = Block.getContext();
Parent =
@@ -1024,8 +1030,6 @@ void DwarfDebug::ConstructDbgScope(DbgScope *ParentScope,
AddLabel(Die, dwarf::DW_AT_high_pc, dwarf::DW_FORM_addr,
DWLabel("func_end", SubprogramCount));
- // Add the scope's contents.
- ConstructDbgScope(ConcreteInst, StartID, EndID, Die, Unit);
ParentDie->AddChild(Die);
}