[llvm] [CFI] Create an external linkage alias instead of promoting internals (PR #203171)
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 16 10:13:43 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:
Hmm... maybe. Let me build a repro for what you're saying (need to anyway, for a test)
https://github.com/llvm/llvm-project/pull/203171
More information about the llvm-commits
mailing list