================
@@ -4652,6 +4659,7 @@ llvm::Constant 
*CodeGenModule::GetOrCreateMultiVersionResolver(GlobalDecl GD) {
                                   "", Resolver, &getModule());
     GIF->setName(ResolverName);
     SetCommonAttributes(FD, GIF);
+    SetResolverAttrs(cast<llvm::Function>(Resolver));
----------------
labrinea wrote:

When we create the resolver with GetOrCreateLLVMFunction, we construct a 
GlobalDecl on the spot, and as a result it won't call SetFunctionAttributes 
because the underlying Decl is nullptr. SetFunctionAttributes is responsible 
for setting the symbol's visibility and target attributes, therefore it's what 
we are missing.

https://github.com/llvm/llvm-project/pull/141573
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to