[PATCH] D30738: Don't internalize llvm GV's with InternalizeLinkedSymbols

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 9 14:33:09 PST 2017


JDevlieghere marked an inline comment as done.
JDevlieghere added inline comments.


================
Comment at: tools/llvm-link/llvm-link.cpp:326
+    } else {
+      Err = L.linkInModule(std::move(M), ApplicableFlags);
+    }
----------------
tejohnson wrote:
> Why is this needed since linkInModule has a default for the InternalizeCallback parameter?
I'm sorry, I don't understand the question. The function is called with only two parameters so the default argument is used for the callback. No callback means no internalization, so thats what we want in the else branch? Am I overlooking something?


================
Comment at: tools/llvm-link/llvm-link.cpp:329
+
+    InternalizeLinkedSymbols |= Internalize;
+
----------------
tejohnson wrote:
> Previously the internalize flag was set before invoking this function from main(). With this being set after the first linkInModule it seems like a behavior change, or am I missing something?
Indeed, however on line 275 it is cleared on the first iteration by AND'ing it with overrideFromSrc flag.


Repository:
  rL LLVM

https://reviews.llvm.org/D30738





More information about the llvm-commits mailing list