[clang] [clang-tools-extra] [llvm] [Clang] Fix linker error for function multiversioning (PR #71706)
Tom Honermann via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 22 16:20:28 PST 2023
================
@@ -4282,10 +4300,19 @@ llvm::Constant *CodeGenModule::GetOrCreateMultiVersionResolver(GlobalDecl GD) {
// Holds the name of the resolver, in ifunc mode this is the ifunc (which has
// a separate resolver).
std::string ResolverName = MangledName;
- if (getTarget().supportsIFunc())
- ResolverName += ".ifunc";
- else if (FD->isTargetMultiVersion())
+ if (getTarget().supportsIFunc()) {
+ // In Aarch64, default versions of multiversioned functions are mangled to
+ // their 'normal' assembly name. This deviates from other targets which
+ // append a '.default' string. As a result we need to continue appending
+ // .ifunc in Aarch64.
+ // FIXME: Should Aarch64 mangling for 'default' multiversion function and
+ // in turn ifunc function match that of other targets?
----------------
tahonermann wrote:
@DanielKristofKiss, please ensure this comment and FIXME is addressed/removed by your follow up patch.
https://github.com/llvm/llvm-project/pull/71706
More information about the cfe-commits
mailing list