[PATCH] D32544: LTO: Mark undefined module inline asm symbols as visible outside of ThinLTO.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 10:25:45 PDT 2017


pcc added inline comments.


================
Comment at: llvm/lib/Object/IRSymtab.cpp:166-168
+    // Undefined module asm symbols act as GC roots and are implicitly used.
+    if (Flags & object::BasicSymbolRef::SF_Undefined)
+      Sym.Flags |= 1 << storage::Symbol::FB_used;
----------------
davide wrote:
> With this patch in place, do we still need the call to `collectAsmUndefined` in the ThinLTO backend? (I understand we need it for LTO, still)
Good point. I actually think we can remove it from both because preventing internalization should be sufficient to keep the symbol alive.


https://reviews.llvm.org/D32544





More information about the llvm-commits mailing list