[PATCH] D21894: [ELF] - Fixed incorrect logic of version assignments when mixing wildcards with values matching.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 2 00:03:13 PDT 2016
ruiu added inline comments.
================
Comment at: ELF/SymbolTable.cpp:581
@@ +580,3 @@
+ for (StringRef Name : V.Globals)
+ if (Name.find_first_of("?*") == StringRef::npos) {
+ SymbolBody *B = find(Name);
----------------
Define `hasWildcard(StringRef S)` and use early continue.
if (hasWildcard(Name))
continue;
================
Comment at: ELF/SymbolTable.cpp:601
@@ +600,3 @@
+ for (StringRef Name : V.Globals)
+ if (Name.find_first_of("?*") != StringRef::npos) {
+ std::vector<SymbolBody *> Syms = findAll(Name);
----------------
Early continue.
================
Comment at: ELF/SymbolTable.cpp:602-603
@@ +601,4 @@
+ if (Name.find_first_of("?*") != StringRef::npos) {
+ std::vector<SymbolBody *> Syms = findAll(Name);
+ for (SymbolBody *B : Syms)
+ if (B->symbol()->VersionId == VER_NDX_GLOBAL ||
----------------
for (SymbolBody *B : findAll(Name))
http://reviews.llvm.org/D21894
More information about the llvm-commits
mailing list