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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285937 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chandler Carruth 2016-11-03 17:11:11 +00:00
parent cad7687580
commit 9a2d9babdc

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