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
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
index 31ba6d4..5b6d33f 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
@@ -40,7 +40,7 @@
   unsigned UniqueID;
 
   /// Node - MDNode for the compile unit.
-  const MDNode *Node;
+  DICompileUnit Node;
 
   /// CUDie - Compile unit debug information entry.
   ///
@@ -94,13 +94,13 @@
   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; }