summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-01-09 03:23:41 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-01-09 03:23:41 +0000
commitf645f963ff53cb6adca73b805e729ed955a20944 (patch)
tree532424c347402d50b10703122d9c6202ed181e14 /llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
parent7480ae6e191df66333f97885e0d38c08fffd8101 (diff)
downloadbcm5719-llvm-f645f963ff53cb6adca73b805e729ed955a20944.tar.gz
bcm5719-llvm-f645f963ff53cb6adca73b805e729ed955a20944.zip
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. llvm-svn: 198842
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index 8df9c3b05cd..b066c95fe9b 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -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;
}
OpenPOWER on IntegriCloud