[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:33:19 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:
> pcc wrote:
> > 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.
> You probably already noticed, but there may be some test in lld that needs updating (so you can catch it before the bots start yelling).
Yes, that was `lld/test/ELF/lto/asmundef.ll`, which I already updated :)


https://reviews.llvm.org/D32544





More information about the llvm-commits mailing list