[PATCH] D113352: [clang] Run LLVM Verifier in modes without CodeGen too
Itay Bookstein via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 7 23:18:49 PST 2021
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
More information about the cfe-commits
mailing list