DwarfCompileUnit: Initialize DebugInfoOffset.
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 20 Nov 2013 18:52:39 +0000 (18:52 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 20 Nov 2013 18:52:39 +0000 (18:52 +0000)
While not strictly necessary (the class has an invariant that
"setDebugInfoOffset" is called before "getDebugInfoOffset" - anyone
client that actually gets the default zero offset is buggy/broken) this
is consistent with the code as originally written and the removal of the
initialization was an accident in r195166.

Suggested by Manman Ren.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195263 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp

index 688791e04ff663fd76fdda72fa1697c099c7e479..17740259ef864791e822310c02a1e71e99bff0be 100644 (file)
@@ -41,7 +41,7 @@ static cl::opt<bool> GenerateTypeUnits("generate-type-units", cl::Hidden,
 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()) {
+      IndexTyDie(0), Language(Node.getLanguage()), DebugInfoOffset(0) {
   DIEIntegerOne = new (DIEValueAllocator) DIEInteger(1);
   insertDIE(Node, D);
 }
@@ -49,7 +49,7 @@ CompileUnit::CompileUnit(unsigned UID, DIE *D, DICompileUnit Node,
 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) {
+      IndexTyDie(0), Language(Language), DebugInfoOffset(0) {
   DIEIntegerOne = new (DIEValueAllocator) DIEInteger(1);
 }