ibookstein added inline comments.

================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:5016
   llvm::Constant *Resolver =
-      GetOrCreateLLVMFunction(IFA->getResolver(), ResolverTy, GD,
+      GetOrCreateLLVMFunction(IFA->getResolver(), ResolverTy, {},
                               /*ForVTable=*/false);
----------------
rjmccall wrote:
> Hmm, what was going on here?
The `emitIFuncDefinition` fucntion incorrectly passes the GlobalDecl of the 
IFunc itself to the call to GetOrCreateLLVMFunction for creating the resolver, 
which causes it to be created with a wrong attribute list, which fails 
`Verifier::visitFunction` with "Attribute after last parameter!". You'll note 
that unlike the relationship between aliases and their aliasees, the resolver 
and the ifunc have different types - the resolver takes no parameters.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113352/new/

https://reviews.llvm.org/D113352

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to