[clang] [llvm] [WPD]: Apply speculative WPD in non-lto mode. (PR #145031)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 4 10:56:27 PDT 2025


================
@@ -1333,10 +1377,10 @@ bool DevirtModule::trySingleImplDevirt(
   if (!IsExported)
     return false;
 
-  // If the only implementation has local linkage, we must promote to external
-  // to make it visible to thin LTO objects. We can only get here during the
-  // ThinLTO export phase.
-  if (TheFn->hasLocalLinkage()) {
+  // In LTO mode, if the only implementation has local linkage, we must promote
+  // to external to make it visible to thin LTO objects. We can only get here
+  // during the ThinLTO export phase.
----------------
teresajohnson wrote:

Is the last sentence still true?

https://github.com/llvm/llvm-project/pull/145031


More information about the llvm-commits mailing list