[llvm-readobj/ELF] Simplify Verdef handling.

llvm-svn: 254751
This commit is contained in:
Davide Italiano 2015-12-04 19:27:58 +00:00
parent 7123bca7fb
commit 20fe428859
1 changed files with 1 additions and 7 deletions

View File

@ -433,17 +433,11 @@ StringRef ELFDumper<ELFT>::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);