mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
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:
@@ -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; }
|
||||
|
Reference in New Issue
Block a user