DwarfCompileUnit: Initialize DebugInfoOffset.

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.

llvm-svn: 195263
This commit is contained in:
David Blaikie 2013-11-20 18:52:39 +00:00
parent bcb418e56f
commit beee345ab0
1 changed files with 2 additions and 2 deletions

View 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);
}