[PATCH] D34037: [LLD][ELF] Allow multiple thunks to be added for a symbol.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 8 10:58:13 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/Relocations.cpp:1059-1060
+      if (ET->compatibleWith(Type)) {
+        T = ET;
+        return std::make_pair(T, Res.second);
+      }
----------------
Can you return `{ET, false}`?


================
Comment at: ELF/Relocations.cpp:1064
+  // No existing compatible Thunk in range, create a new one
+  T = addThunk(Type, Body);
+  Res.first->second.push_back(T);
----------------
If so, you can move the definition of T here.


https://reviews.llvm.org/D34037





More information about the llvm-commits mailing list