mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Add type DIE into appropriate context DIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63154 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1687,9 +1687,23 @@ private:
|
|||||||
ConstructTypeDIE(DW_Unit, Buffer, DICompositeType(Ty.getGV()));
|
ConstructTypeDIE(DW_Unit, Buffer, DICompositeType(Ty.getGV()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add debug information entry to entity and unit.
|
// Add debug information entry to entity and appropriate context.
|
||||||
DIE *Die = DW_Unit->AddDie(Buffer);
|
DIE *Die = NULL;
|
||||||
|
DIDescriptor Context = Ty.getContext();
|
||||||
|
if (!Context.isNull())
|
||||||
|
Die = DW_Unit->getDieMapSlotFor(Context.getGV());
|
||||||
|
|
||||||
|
if (Die) {
|
||||||
|
DIE *Child = new DIE(Buffer);
|
||||||
|
Die->AddChild(Child);
|
||||||
|
Buffer.Detach();
|
||||||
|
SetDIEntry(Slot, Child);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Die = DW_Unit->AddDie(Buffer);
|
||||||
SetDIEntry(Slot, Die);
|
SetDIEntry(Slot, Die);
|
||||||
|
}
|
||||||
|
|
||||||
Entity->AddValue(DW_AT_type, DW_FORM_ref4, Slot);
|
Entity->AddValue(DW_AT_type, DW_FORM_ref4, Slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user