diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-03-14 14:58:36 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-03-14 14:58:36 +0000 |
commit | 1082fa66a5ba321f55120ab26c996c7c86ac1e56 (patch) | |
tree | 2211e9fdea5c3bc83450f0826824456f418779e2 /llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | |
parent | 35bc38af207324ac8caa459159d6899ede1803be (diff) | |
download | bcm5719-llvm-1082fa66a5ba321f55120ab26c996c7c86ac1e56.tar.gz bcm5719-llvm-1082fa66a5ba321f55120ab26c996c7c86ac1e56.zip |
Revert "Recommitted r261633 "Supporting all entities declared in lexical scope in LLVM debug info." After fixing PR26715 at r263379."
This reverts commit r263424. Breaks self-host.
llvm-svn: 263437
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index 49a3b6e0b2f..d2cf8effdc2 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -298,15 +298,10 @@ void DwarfUnit::addDIEEntry(DIE &Die, dwarf::Attribute Attribute, Entry); } -DIE *DwarfUnit::createDIE(unsigned Tag, const DINode *N) { - DIE *Die = DIE::get(DIEValueAllocator, (dwarf::Tag)Tag); - if (N) - insertDIE(N, Die); - return Die; -} - DIE &DwarfUnit::createAndAddDIE(unsigned Tag, DIE &Parent, const DINode *N) { - DIE &Die = Parent.addChild(createDIE(Tag, N)); + DIE &Die = Parent.addChild(DIE::get(DIEValueAllocator, (dwarf::Tag)Tag)); + if (N) + insertDIE(N, &Die); return Die; } @@ -732,18 +727,15 @@ DIE *DwarfUnit::getOrCreateTypeDIE(const MDNode *TyNode) { // Construct the context before querying for the existence of the DIE in case // such construction creates the DIE. - // For Local Scope, do not construct context DIE. auto *Context = resolve(Ty->getScope()); - bool IsLocalScope = Context && isa<DILocalScope>(Context); - DIE *ContextDIE = IsLocalScope ? nullptr : getOrCreateContextDIE(Context); - assert(ContextDIE || IsLocalScope); + DIE *ContextDIE = getOrCreateContextDIE(Context); + assert(ContextDIE); if (DIE *TyDIE = getDIE(Ty)) return TyDIE; - // Create new type and add to map. - DIE &TyDIE = IsLocalScope ? *createDIE(Ty->getTag(), Ty) - : createAndAddDIE(Ty->getTag(), *ContextDIE, Ty); + // Create new type. + DIE &TyDIE = createAndAddDIE(Ty->getTag(), *ContextDIE, Ty); updateAcceleratorTables(Context, Ty, TyDIE); |