[llvm] [win][arm64ec] Handle `available_externally` functions (PR #151610)
Daniel Paoliello via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 1 10:20:23 PDT 2025
================
@@ -872,7 +872,7 @@ bool AArch64Arm64ECCallLowering::runOnModule(Module &Mod) {
if (!F.isDeclaration() && (!F.hasLocalLinkage() || F.hasAddressTaken()) &&
F.getCallingConv() != CallingConv::ARM64EC_Thunk_Native &&
F.getCallingConv() != CallingConv::ARM64EC_Thunk_X64) {
- if (!F.hasComdat())
+ if (!F.hasComdat() && !F.isDeclarationForLinker())
F.setComdat(Mod.getOrInsertComdat(F.getName()));
----------------
dpaoliello wrote:
Good call: expanded the test and fixed other cases where we should be using `isDeclarationForLinker` instead of `isDeclaration`.
https://github.com/llvm/llvm-project/pull/151610
More information about the llvm-commits
mailing list