[PATCH] D18415: [LTO] Basic support for internalize.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 13:10:19 PDT 2016


davide marked 4 inline comments as done.
davide added a comment.

Oh, the testcase was there before (just didn't show up in my last rev, weird).
Addressing some of your comments + reply.


================
Comment at: ELF/LTO.cpp:113
@@ +112,3 @@
+          // symbols when creating a shared library.
+          if (!Config->Shared && !Used.count(GV) && !B->isUsedInRegularObj())
+            InternalizedSyms.insert(GV->getName());
----------------
rafael wrote:
> ExportDynamic should have the same treatment as shared. Not sure if we already have a convenient predicate for either.
Can I do this separately? (And add a specific test for it)

================
Comment at: ELF/SymbolTable.cpp:221
@@ +220,3 @@
+  if (auto *BC = dyn_cast<DefinedBitcode>(Existing))
+    if (auto *U = dyn_cast<Undefined>(New))
+      BC->setUsedInRegularObj();
----------------
rafael wrote:
> I am not sure just Undefined is sufficient.
> 
> If a weak symbol in an object file is replaced with a strong symbol in a .bc file, there can be a reference from the strong symbol to the bit code one.
> 
Can I do this separately?


http://reviews.llvm.org/D18415





More information about the llvm-commits mailing list