[PATCH] D21018: [ELF] - Basic versioned symbols support implemented.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 19 22:43:38 PDT 2016


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM


================
Comment at: ELF/SymbolListFile.h:14
@@ -13,2 +13,3 @@
 #include "lld/Core/LLVM.h"
+#include "llvm/ADT/MapVector.h"
 #include "llvm/Support/MemoryBuffer.h"
----------------
Remove.

================
Comment at: ELF/SymbolTable.cpp:535
@@ +534,3 @@
+      if (SymbolBody *B = find(Name))
+        B->symbol()->VersionId = I;
+    ++I;
----------------
I'm wondering if this could be `I++`?

================
Comment at: ELF/Writer.cpp:915-916
@@ -908,1 +914,4 @@
       Add(Out<ELFT>::VerSym);
+    if (Out<ELFT>::VerDef)
+      Add(Out<ELFT>::VerDef);
+    if (HasVerNeed)
----------------
Add doesn't do anything if an argument is null. So you can remove the `if` guard.


http://reviews.llvm.org/D21018





More information about the llvm-commits mailing list