[clang] [lld] [llvm] [LTO][LLD] Prevent invalid LTO libfunc transforms (PR #164916)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 15 05:49:24 PST 2026
================
@@ -443,6 +450,14 @@ class LTO {
LLVM_ABI static SmallVector<const char *>
getRuntimeLibcallSymbols(const Triple &TT);
+ /// Static method that returns a list of library function symbols that can be
+ /// generated by LTO but might not be visible from bitcode symbol table.
+ /// Unlike the runtime libcalls, the linker can report to the code generator
+ /// which of these are actually available in the link, and the code generator
+ /// can then only reference that set of symbols.
+ LLVM_ABI static SmallVector<StringRef>
+ getLibFuncSymbols(const Triple &TT, llvm::StringSaver &Saver);
----------------
arsenm wrote:
With this, the linker needs to take the set of symbols from both here and getRuntimeLibcallSymbols? I guess that makes sense, but is even more reason that these should be fused
https://github.com/llvm/llvm-project/pull/164916
More information about the cfe-commits
mailing list