From e5f2b035dd8ff5cce3e12d5ab7e478f7e66b9117 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 22 Jun 2021 22:10:51 +0200 Subject: [OpaquePtr] Support invoke instruction With call support in place, this is only a matter of relaxing a bitcode reader assertion. --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 7d69bd4..7deb193 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -4638,7 +4638,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) { cast(Callee->getType())->getElementType()); if (!FTy) return error("Callee is not of pointer to function type"); - } else if (cast(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) -- cgit v1.1