]> granicus.if.org Git - llvm/commitdiff
Delete some dead code and add a missing "0x" prefix to a hex string in
authorChandler Carruth <chandlerc@gmail.com>
Thu, 3 Nov 2016 17:11:11 +0000 (17:11 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 3 Nov 2016 17:11:11 +0000 (17:11 +0000)
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

tools/llvm-readobj/ELFDumper.cpp

index 5507bc5ac93a5dd9ef2f792a01c2e715499bbe07..05c018cfe3d05de65177012ee94299df4d3c870e 100644 (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);