[PATCH] D42107: [ThinLTO] - Stop internalizing and drop non-prevailing symbols.

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 08:17:35 PST 2018


tejohnson added a comment.

No worries - I have done the same thing myself (broken lld bots with LTO changes since I don't always run them before commit).



================
Comment at: lib/LTO/LTO.cpp:430
+    // if symbol is defined in module level inline asm block.
+    if (GlobalRes.IRName.empty() || Res.Prevailing)
+      GlobalRes.IRName = Sym.getIRName();
----------------
This assumes that the non-prevailing asm symbol with the name is seen here before the prevailing symbol without a name (which does always seem to currently be the case). Otherwise, the non-prevailing symbol would come along and fill in the name since it will be empty. Suggest moving this block up above the previous one that sets the Prevailing flag, then add an assert that if !Sym.getIRName.empty() that Res.Prevailing is not already true. I.e. that we don't overwrite the IRName when we already set it from the Prevailing copy.


https://reviews.llvm.org/D42107





More information about the llvm-commits mailing list