From 2b50cdde679409dac8b96b9cf15f8560b34d0741 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Fri, 4 Dec 2015 19:27:58 +0000 Subject: [PATCH] [llvm-readobj/ELF] Simplify Verdef handling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254751 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-readobj/ELFDumper.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tools/llvm-readobj/ELFDumper.cpp b/tools/llvm-readobj/ELFDumper.cpp index ef07a85f885..02397f38284 100644 --- a/tools/llvm-readobj/ELFDumper.cpp +++ b/tools/llvm-readobj/ELFDumper.cpp @@ -433,17 +433,11 @@ StringRef ELFDumper::getSymbolVersion(StringRef StrTab, if (entry.isVerdef()) { // The first Verdaux entry holds the name. name_offset = entry.getVerdef()->getAux()->vda_name; - } else { - name_offset = entry.getVernaux()->vna_name; - } - - // Set IsDefault - if (entry.isVerdef()) { IsDefault = !(vs->vs_index & ELF::VERSYM_HIDDEN); } else { + name_offset = entry.getVernaux()->vna_name; IsDefault = false; } - if (name_offset >= StrTab.size()) reportError("Invalid string offset"); return StringRef(StrTab.data() + name_offset); -- 2.34.1