[llvm] [WholeProgramDevirt] Add check for AvailableExternal and give up devirt (PR #143468)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 10 07:23:29 PDT 2025


================
@@ -1103,6 +1104,16 @@ bool DevirtModule::tryFindVirtualCallTargets(
         GlobalObject::VCallVisibilityPublic)
       return false;
 
+    // Record if the first GV is AvailableExternally
+    if (TargetsForSlot.empty())
+      hasAvailableExternally = TM.Bits->GV->hasAvailableExternallyLinkage();
+
+    // When the first GV is AvailableExternally, check if all other GVs are
----------------
teresajohnson wrote:

Why is it ok if they are all available externally?

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


More information about the llvm-commits mailing list