DwarfUnit: Rename "Node" to "CUNode" and propagate it through DwarfTypeUnit as well.

Since we'll now also need the split dwarf file name along with the
language in DwarfTypeUnits, just use the whole DICompileUnit rather than
explicitly handling each field needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198842 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-01-09 03:23:41 +00:00
parent 75a032dc00
commit 2af945d2cd
4 changed files with 18 additions and 22 deletions

View File

@@ -42,8 +42,8 @@ GenerateDwarfTypeUnits("generate-type-units", cl::Hidden,
/// Unit - Unit constructor.
DwarfUnit::DwarfUnit(unsigned UID, DIE *D, DICompileUnit Node, AsmPrinter *A,
DwarfDebug *DW, DwarfFile *DWU)
: UniqueID(UID), Node(Node), UnitDie(D), DebugInfoOffset(0), Asm(A), DD(DW),
DU(DWU), IndexTyDie(0), Section(0), Skeleton(0) {
: UniqueID(UID), CUNode(Node), UnitDie(D), DebugInfoOffset(0), Asm(A),
DD(DW), DU(DWU), IndexTyDie(0), Section(0), Skeleton(0) {
DIEIntegerOne = new (DIEValueAllocator) DIEInteger(1);
}
@@ -54,9 +54,9 @@ DwarfCompileUnit::DwarfCompileUnit(unsigned UID, DIE *D, DICompileUnit Node,
insertDIE(Node, D);
}
DwarfTypeUnit::DwarfTypeUnit(unsigned UID, DIE *D, uint16_t Language,
DwarfTypeUnit::DwarfTypeUnit(unsigned UID, DIE *D, DICompileUnit CUNode,
AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU)
: DwarfUnit(UID, D, DICompileUnit(), A, DW, DWU), Language(Language) {}
: DwarfUnit(UID, D, CUNode, A, DW, DWU) {}
/// ~Unit - Destructor for compile unit.
DwarfUnit::~DwarfUnit() {
@@ -956,8 +956,7 @@ DIE *DwarfUnit::getOrCreateTypeDIE(const MDNode *TyNode) {
DICompositeType CTy(Ty);
if (GenerateDwarfTypeUnits && !Ty.isForwardDecl())
if (MDString *TypeId = CTy.getIdentifier()) {
DD->addDwarfTypeUnitType(getLanguage(), TypeId->getString(), TyDIE,
CTy);
DD->addDwarfTypeUnitType(getCUNode(), TypeId->getString(), TyDIE, CTy);
// Skip updating the accellerator tables since this is not the full type
return TyDIE;
}