DwarfCompileUnit: Add type safety by using DICompileUnit rather than raw MDNode* for the CU metadata node

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194893 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2013-11-15 23:52:02 +00:00
parent aedaa723c2
commit 942431fa71
4 changed files with 16 additions and 16 deletions

View File

@@ -40,7 +40,7 @@ class CompileUnit {
unsigned UniqueID;
/// Node - MDNode for the compile unit.
const MDNode *Node;
DICompileUnit Node;
/// CUDie - Compile unit debug information entry.
///
@@ -94,13 +94,13 @@ class CompileUnit {
DIEInteger *DIEIntegerOne;
public:
CompileUnit(unsigned UID, DIE *D, const MDNode *N, AsmPrinter *A,
CompileUnit(unsigned UID, DIE *D, DICompileUnit CU, AsmPrinter *A,
DwarfDebug *DW, DwarfUnits *DWU);
~CompileUnit();
// Accessors.
unsigned getUniqueID() const { return UniqueID; }
uint16_t getLanguage() const { return DICompileUnit(Node).getLanguage(); }
uint16_t getLanguage() const { return Node.getLanguage(); }
const MDNode *getNode() const { return Node; }
DIE *getCUDie() const { return CUDie.get(); }
const StringMap<DIE *> &getGlobalNames() const { return GlobalNames; }