diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-06-22 22:00:40 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-06-23 20:17:26 +0200 |
commit | f660af46e3df342245b6a0aacd8989c5a2212552 (patch) | |
tree | c18121e06d7798502952dd95cf9224d6035eb38f /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | e3d24b45b8f808ec66213e134c4ceda5202fbe31 (diff) | |
download | llvm-f660af46e3df342245b6a0aacd8989c5a2212552.zip llvm-f660af46e3df342245b6a0aacd8989c5a2212552.tar.gz llvm-f660af46e3df342245b6a0aacd8989c5a2212552.tar.bz2 |
[OpaquePtr] Support call instruction
Add support for call of opaque pointer, currently only possible for
indirect calls.
This requires a bit of special casing in LLParser, as calls do not
specify the callee operand type explicitly.
Differential Revision: https://reviews.llvm.org/D104740
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 1631dc3..7d69bd4 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -5266,7 +5266,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 (!OpTy->isOpaqueOrPointeeTypeMatches(FTy)) return error("Explicit call type does not match pointee type of " "callee operand"); if (Record.size() < FTy->getNumParams() + OpNum) |