mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
Revert "[DWARF] Fix debug info generation for function static variables, typedefs, and records"
Caused PR24008
This reverts commit 37cb5f1c2d
.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241176 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -704,7 +704,7 @@ DIE *DwarfUnit::createTypeDIE(const DICompositeType *Ty) {
|
||||
return &TyDIE;
|
||||
}
|
||||
|
||||
DIE *DwarfUnit::getOrCreateTypeDIE(const MDNode *TyNode, DIE *ContextDIE) {
|
||||
DIE *DwarfUnit::getOrCreateTypeDIE(const MDNode *TyNode) {
|
||||
if (!TyNode)
|
||||
return nullptr;
|
||||
|
||||
@@ -714,20 +714,17 @@ DIE *DwarfUnit::getOrCreateTypeDIE(const MDNode *TyNode, DIE *ContextDIE) {
|
||||
|
||||
// DW_TAG_restrict_type is not supported in DWARF2
|
||||
if (Ty->getTag() == dwarf::DW_TAG_restrict_type && DD->getDwarfVersion() <= 2)
|
||||
return getOrCreateTypeDIE(resolve(cast<DIDerivedType>(Ty)->getBaseType()),
|
||||
ContextDIE);
|
||||
return getOrCreateTypeDIE(resolve(cast<DIDerivedType>(Ty)->getBaseType()));
|
||||
|
||||
// Construct the context before querying for the existence of the DIE in case
|
||||
// such construction creates the DIE.
|
||||
auto *Context = resolve(Ty->getScope());
|
||||
if (ContextDIE == nullptr)
|
||||
ContextDIE = getOrCreateContextDIE(Context);
|
||||
DIE *ContextDIE = getOrCreateContextDIE(Context);
|
||||
assert(ContextDIE);
|
||||
|
||||
if (DIE *TyDIE = getDIE(Ty))
|
||||
return TyDIE;
|
||||
|
||||
assert(ContextDIE);
|
||||
|
||||
// Create new type.
|
||||
DIE &TyDIE = createAndAddDIE(Ty->getTag(), *ContextDIE, Ty);
|
||||
|
||||
|
Reference in New Issue
Block a user