mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
DwarfUnit: Provide a reference to a defining DwarfCompileUnit from DwarfTypeUnit.
Type units need to insert their file strings into the compile unit's line/file table. This is preliminary work to that end. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201196 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -55,9 +55,11 @@ DwarfCompileUnit::DwarfCompileUnit(unsigned UID, DIE *D, DICompileUnit Node,
|
||||
insertDIE(Node, D);
|
||||
}
|
||||
|
||||
DwarfTypeUnit::DwarfTypeUnit(unsigned UID, DIE *D, DICompileUnit CUNode,
|
||||
DwarfTypeUnit::DwarfTypeUnit(unsigned UID, DIE *D, DwarfCompileUnit &CU,
|
||||
AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU)
|
||||
: DwarfUnit(UID, D, CUNode, A, DW, DWU) {}
|
||||
: DwarfUnit(UID, D, CU.getCUNode(), A, DW, DWU), CU(CU) {
|
||||
(void)CU;
|
||||
}
|
||||
|
||||
/// ~Unit - Destructor for compile unit.
|
||||
DwarfUnit::~DwarfUnit() {
|
||||
@ -944,7 +946,7 @@ DIE *DwarfUnit::getOrCreateTypeDIE(const MDNode *TyNode) {
|
||||
DICompositeType CTy(Ty);
|
||||
if (GenerateDwarfTypeUnits && !Ty.isForwardDecl())
|
||||
if (MDString *TypeId = CTy.getIdentifier()) {
|
||||
DD->addDwarfTypeUnitType(getCUNode(), TypeId->getString(), TyDIE, CTy);
|
||||
DD->addDwarfTypeUnitType(getCU(), TypeId->getString(), TyDIE, CTy);
|
||||
// Skip updating the accellerator tables since this is not the full type
|
||||
return TyDIE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user