Remove the language parameter and variable from the compile unit. We
can get it via the MDNode that's passed in. Save that instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189291 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
index 92c56db..7713c02 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
@@ -39,9 +39,8 @@
///
unsigned UniqueID;
- /// Language - The DW_AT_language of the compile unit
- ///
- unsigned Language;
+ /// Node - MDNode for the compile unit.
+ const MDNode *Node;
/// Die - Compile unit debug information entry.
///
@@ -96,13 +95,14 @@
int64_t getDefaultLowerBound() const;
public:
- CompileUnit(unsigned UID, unsigned L, DIE *D, const MDNode *N, AsmPrinter *A,
+ CompileUnit(unsigned UID, DIE *D, const MDNode *N, AsmPrinter *A,
DwarfDebug *DW, DwarfUnits *DWU);
~CompileUnit();
// Accessors.
unsigned getUniqueID() const { return UniqueID; }
- unsigned getLanguage() const { return Language; }
+ uint16_t getLanguage() const { return DICompileUnit(Node).getLanguage(); }
+ const MDNode *getNode() const { return Node; }
DIE* getCUDie() const { return CUDie.get(); }
unsigned getDebugInfoOffset() const { return DebugInfoOffset; }
const StringMap<DIE*> &getGlobalNames() const { return GlobalNames; }