[llvm] r195296 - Reorder language in the CompileUnit description and add a comment.

Eric Christopher echristo at gmail.com
Wed Nov 20 17:14:00 PST 2013


Author: echristo
Date: Wed Nov 20 19:14:00 2013
New Revision: 195296

URL: http://llvm.org/viewvc/llvm-project?rev=195296&view=rev
Log:
Reorder language in the CompileUnit description and add a comment.

Language may only be a temporary addition.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=195296&r1=195295&r2=195296&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Wed Nov 20 19:14:00 2013
@@ -40,16 +40,16 @@ static cl::opt<bool> GenerateTypeUnits("
 /// CompileUnit - Compile unit constructor.
 CompileUnit::CompileUnit(unsigned UID, DIE *D, DICompileUnit Node,
                          AsmPrinter *A, DwarfDebug *DW, DwarfUnits *DWU)
-    : UniqueID(UID), Node(Node), CUDie(D), Asm(A), DD(DW), DU(DWU),
-      IndexTyDie(0), Language(Node.getLanguage()), DebugInfoOffset(0) {
+    : UniqueID(UID), Node(Node), Language(Node.getLanguage()), CUDie(D), Asm(A),
+      DD(DW), DU(DWU), IndexTyDie(0), DebugInfoOffset(0) {
   DIEIntegerOne = new (DIEValueAllocator) DIEInteger(1);
   insertDIE(Node, D);
 }
 
 CompileUnit::CompileUnit(unsigned UID, DIE *D, uint16_t Language, AsmPrinter *A,
                          DwarfDebug *DD, DwarfUnits *DU)
-    : UniqueID(UID), Node(NULL), CUDie(D), Asm(A), DD(DD), DU(DU),
-      IndexTyDie(0), Language(Language), DebugInfoOffset(0) {
+    : UniqueID(UID), Node(NULL), Language(Language), CUDie(D), Asm(A), DD(DD),
+      DU(DU), IndexTyDie(0), DebugInfoOffset(0) {
   DIEIntegerOne = new (DIEValueAllocator) DIEInteger(1);
 }
 

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h?rev=195296&r1=195295&r2=195296&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h Wed Nov 20 19:14:00 2013
@@ -42,6 +42,9 @@ class CompileUnit {
   /// Node - MDNode for the compile unit.
   DICompileUnit Node;
 
+  /// Language - Language for the translation unit associated with this CU.
+  uint16_t Language;
+
   /// CUDie - Compile unit debug information entry.
   ///
   const OwningPtr<DIE> CUDie;
@@ -93,8 +96,6 @@ class CompileUnit {
   // DIEIntegerOne - A preallocated DIEValue because 1 is used frequently.
   DIEInteger *DIEIntegerOne;
 
-  uint16_t Language;
-
 public:
   CompileUnit(unsigned UID, DIE *D, DICompileUnit CU, AsmPrinter *A,
               DwarfDebug *DW, DwarfUnits *DWU);





More information about the llvm-commits mailing list