[PATCH] D24617: [LTO] Prevent asm undefined references to be dropped from the output

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 15 11:40:39 PDT 2016


tejohnson added a comment.

Thanks! With a few changes noted below this can be fixed for ThinLTO as well.


================
Comment at: lib/LTO/LTO.cpp:353
@@ -341,1 +352,3 @@
+    if (Sym.getFlags() & object::BasicSymbolRef::SF_Undefined) {
+			handleUndefinedAsmRefs(Sym, GV, RegularLTO.AsmUndefinedRefs);
       continue;
----------------
Do this in addSymbolToGlobalRes instead, so it is added for ThinLTO as well

================
Comment at: lib/LTO/LTOBackend.cpp:291
@@ +290,3 @@
+  // off asm undefined references.
+  updateCompilerUsed(*Mod, *TM, AsmUndefinedRefs);
+
----------------
Ditto in thinBackend below


https://reviews.llvm.org/D24617





More information about the llvm-commits mailing list