[llvm] r254751 - [llvm-readobj/ELF] Simplify Verdef handling.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 4 11:27:58 PST 2015
Author: davide
Date: Fri Dec 4 13:27:58 2015
New Revision: 254751
URL: http://llvm.org/viewvc/llvm-project?rev=254751&view=rev
Log:
[llvm-readobj/ELF] Simplify Verdef handling.
Modified:
llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
Modified: llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/ELFDumper.cpp?rev=254751&r1=254750&r2=254751&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/ELFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/ELFDumper.cpp Fri Dec 4 13:27:58 2015
@@ -433,17 +433,11 @@ StringRef ELFDumper<ELFT>::getSymbolVers
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);
More information about the llvm-commits
mailing list