Revert part of D112349 to allow ifunc resolvers be declarations.

The patch in D112349 added a previously nonexistant restriction on ifunc
resolvers that they MUST be defintions.  However, the function
multiversioning depends on being able to resolve these resolvers at
link-time, so this additional restriction was breaking.
This commit is contained in:
Erich Keane 2021-11-03 07:13:02 -07:00
parent c0f2774973
commit 09233412ed
1 changed files with 1 additions and 3 deletions

View File

@ -829,11 +829,9 @@ void Verifier::visitGlobalAlias(const GlobalAlias &GA) {
void Verifier::visitGlobalIFunc(const GlobalIFunc &GI) {
// Pierce through ConstantExprs and GlobalAliases and check that the resolver
// is a Function definition
// has a Function
const Function *Resolver = GI.getResolverFunction();
Assert(Resolver, "IFunc must have a Function resolver", &GI);
Assert(!Resolver->isDeclarationForLinker(),
"IFunc resolver must be a definition", &GI);
// Check that the immediate resolver operand (prior to any bitcasts) has the
// correct type