From 20fe428859c310702c23b27ef706bd43019d3585 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. llvm-svn: 254751 --- llvm/tools/llvm-readobj/ELFDumper.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp index ef07a85f885d..02397f382848 100644 --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/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);