Fix Use-of-uninitialized-value for adrp_addr and adrp_inst in MachODump.cpp

Fixes PR21607

llvm-svn: 222385
This commit is contained in:
Kevin Enderby 2014-11-19 20:20:16 +00:00
parent 9a25cb8806
commit 10738229c9
1 changed files with 4 additions and 0 deletions

View File

@ -1814,6 +1814,8 @@ static void DisassembleInputMachO2(StringRef Filename,
SymbolizerInfo.method = nullptr;
SymbolizerInfo.demangled_name = nullptr;
SymbolizerInfo.bindtable = nullptr;
SymbolizerInfo.adrp_addr = 0;
SymbolizerInfo.adrp_inst = 0;
// Same for the ThumbSymbolizer
ThumbSymbolizerInfo.verbose = true;
ThumbSymbolizerInfo.O = MachOOF;
@ -1825,6 +1827,8 @@ static void DisassembleInputMachO2(StringRef Filename,
ThumbSymbolizerInfo.method = nullptr;
ThumbSymbolizerInfo.demangled_name = nullptr;
ThumbSymbolizerInfo.bindtable = nullptr;
ThumbSymbolizerInfo.adrp_addr = 0;
ThumbSymbolizerInfo.adrp_inst = 0;
// Disassemble symbol by symbol.
for (unsigned SymIdx = 0; SymIdx != Symbols.size(); SymIdx++) {