Delete some dead code and add a missing "0x" prefix to a hex string in

llvm-readobj.

Another bug caught by PVS-Studio.

It'd be nice to actually have a test for this, but I found it by
inspection from PVS-Studio.

llvm-svn: 285937
This commit is contained in:
Chandler Carruth 2016-11-03 17:11:11 +00:00
parent 1534244145
commit e4a5de9401

View File

@ -2389,8 +2389,7 @@ template <class ELFT> void GNUStyle<ELFT>::printFileHeaders(const ELFO *Obj) {
OS << "\n";
Str = printEnum(e->e_ident[ELF::EI_OSABI], makeArrayRef(ElfOSABI));
printFields(OS, "OS/ABI:", Str);
Str = "0x" + to_hexString(e->e_version);
Str = to_hexString(e->e_ident[ELF::EI_ABIVERSION]);
Str = "0x" + to_hexString(e->e_ident[ELF::EI_ABIVERSION]);
printFields(OS, "ABI Version:", Str);
Str = printEnum(e->e_type, makeArrayRef(ElfObjectFileType));
printFields(OS, "Type:", Str);