[llvm] r194895 - DwarfCompileUnit: Add type safety to CompileUnit::getNode by returning DICompileUnit instead of a raw MDNode*.
David Blaikie
dblaikie at gmail.com
Fri Nov 15 15:54:45 PST 2013
Author: dblaikie
Date: Fri Nov 15 17:54:45 2013
New Revision: 194895
URL: http://llvm.org/viewvc/llvm-project?rev=194895&view=rev
Log:
DwarfCompileUnit: Add type safety to CompileUnit::getNode by returning DICompileUnit instead of a raw MDNode*.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h?rev=194895&r1=194894&r2=194895&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h Fri Nov 15 17:54:45 2013
@@ -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; }
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=194895&r1=194894&r2=194895&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Nov 15 17:54:45 2013
@@ -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.
More information about the llvm-commits
mailing list