[OpaquePtr] Support invoke instruction

With call support in place, this is only a matter of relaxing a
bitcode reader assertion.
This commit is contained in:
Nikita Popov
2021-06-22 22:10:51 +02:00
parent 56709b8695
commit e5f2b035dd
2 changed files with 18 additions and 1 deletions

View File

@@ -4638,7 +4638,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
cast<PointerType>(Callee->getType())->getElementType());
if (!FTy)
return error("Callee is not of pointer to function type");
} else if (cast<PointerType>(Callee->getType())->getElementType() != FTy)
} else if (!CalleeTy->isOpaqueOrPointeeTypeMatches(FTy))
return error("Explicit invoke type does not match pointee type of "
"callee operand");
if (Record.size() < FTy->getNumParams() + OpNum)