[PATCH] D30738: Don't internalize llvm GV's with InternalizeLinkedSymbols
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 8 08:59:02 PST 2017
mehdi_amini added a comment.
I can see how this feature can be useful, but as Teresa mentioned it seems easier from a client point of view to:
1. Collect the list of symbol in the current module in a Set
2. Call the IRLinker
3. Invoke internalizeModule using the Set from 1) as "preservedGlobals".
That said the IRLinker could do this itself, so that `llvm::Linker::Flags::InternalizeLinkedSymbols` would still be exposed, if is wasn't for the circular dependency mentioned above. We could solve the dependency "easily" by injection: changing the IRLinker to take a callback to perform internalization for stage3. That would allow the client to pass in a pointer to internalizeModule that the IRlinker could use during 3) above.
Repository:
rL LLVM
https://reviews.llvm.org/D30738
More information about the llvm-commits
mailing list