[PATCH] D21894: [ELF] - Fixed incorrect logic of version assignments when mixing wildcards with values matching.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 4 04:20:07 PDT 2016


grimar 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);
----------------
ruiu wrote:
> Define `hasWildcard(StringRef S)` and use early continue.
> 
>   if (hasWildcard(Name))
>     continue;
Done.

================
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);
----------------
ruiu wrote:
> Early continue.
Done.

================
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 ||
----------------
ruiu wrote:
>   for (SymbolBody *B : findAll(Name))
Done.


http://reviews.llvm.org/D21894





More information about the llvm-commits mailing list