[llvm-branch-commits] [llvm] [CFI] Create an external linkage alias instead of promoting internals (PR #203171)

Mircea Trofin via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Aug 12 13:13:15 PDT 2026


================
@@ -1203,7 +1205,17 @@ bool DevirtIndex::tryFindVirtualCallTargets(
       if (mustBeUnreachableFunction(VTP.FuncVI))
         continue;
 
-      TargetsForSlot.push_back(VTP.FuncVI);
+      ValueInfo TheFn = VTP.FuncVI;
+      // Internal linkage functions get an external linkage alias to them.
+      if (!TheFn.getSummaryList().empty())
+        if (auto *AS =
+                dyn_cast<AliasSummary>(TheFn.getSummaryList()[0].get())) {
+          assert(TheFn.getSummaryList().size() == 1 &&
----------------
mtrofin wrote:

turns out, didn't need this. 

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


More information about the llvm-branch-commits mailing list