aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-11-15 23:54:45 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-11-15 23:54:45 +0000
commit7b8677109452dc3f106f931edab2d1ccaf1d06b1 (patch)
tree7049f0a752fbab59b71b3b0834a21f18596f55b9 /lib/CodeGen
parent942431fa710f186f11538eebdf3dc4a6b824a6ba (diff)
downloadexternal_llvm-7b8677109452dc3f106f931edab2d1ccaf1d06b1.zip
external_llvm-7b8677109452dc3f106f931edab2d1ccaf1d06b1.tar.gz
external_llvm-7b8677109452dc3f106f931edab2d1ccaf1d06b1.tar.bz2
DwarfCompileUnit: Add type safety to CompileUnit::getNode by returning DICompileUnit instead of a raw MDNode*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194895 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.h2
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp7
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
index 5b6d33f..059f2be 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
@@ -101,7 +101,7 @@ public:
// Accessors.
unsigned getUniqueID() const { return UniqueID; }
uint16_t getLanguage() const { return Node.getLanguage(); }
- const MDNode *getNode() const { return Node; }
+ DICompileUnit getNode() const { return Node; }
DIE *getCUDie() const { return CUDie.get(); }
const StringMap<DIE *> &getGlobalNames() const { return GlobalNames; }
const StringMap<DIE *> &getGlobalTypes() const { return GlobalTypes; }
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index ff0d43b..f8b2609 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2950,12 +2950,11 @@ void DwarfDebug::emitDebugMacInfo() {
CompileUnit *DwarfDebug::constructSkeletonCU(const CompileUnit *CU) {
DIE *Die = new DIE(dwarf::DW_TAG_compile_unit);
- CompileUnit *NewCU =
- new CompileUnit(CU->getUniqueID(), Die, DICompileUnit(CU->getNode()), Asm,
- this, &SkeletonHolder);
+ CompileUnit *NewCU = new CompileUnit(CU->getUniqueID(), Die, CU->getNode(),
+ Asm, this, &SkeletonHolder);
NewCU->addLocalString(Die, dwarf::DW_AT_GNU_dwo_name,
- DICompileUnit(CU->getNode()).getSplitDebugFilename());
+ CU->getNode().getSplitDebugFilename());
// Relocate to the beginning of the addr_base section, else 0 for the
// beginning of the one for this compile unit.