diff options
author | James Y Knight <jyknight@google.com> | 2019-02-01 20:43:34 +0000 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2019-02-01 20:43:34 +0000 |
commit | d9e85a0861b7e9320c34547a2ad7f49c504a9381 (patch) | |
tree | bafc31ff522534fb10e65ddc519943a7be7abc28 /llvm/lib/Transforms/Utils | |
parent | 7976eb58382b25d0e17490b9d77fb06cb000c95b (diff) | |
download | bcm5719-llvm-d9e85a0861b7e9320c34547a2ad7f49c504a9381.tar.gz bcm5719-llvm-d9e85a0861b7e9320c34547a2ad7f49c504a9381.zip |
[opaque pointer types] Pass function types to InvokeInst creation.
This cleans up all InvokeInst creation in LLVM to explicitly pass a
function type rather than deriving it from the pointer's element-type.
Differential Revision: https://reviews.llvm.org/D57171
llvm-svn: 352910
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index b63f15bff4a..a05a7a23457 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -1980,8 +1980,9 @@ BasicBlock *llvm::changeToInvokeAndSplitBasicBlock(CallInst *CI, // can potentially be avoided with a cleverer API design that we do not have // as of this time. - InvokeInst *II = InvokeInst::Create(CI->getCalledValue(), Split, UnwindEdge, - InvokeArgs, OpBundles, CI->getName(), BB); + InvokeInst *II = + InvokeInst::Create(CI->getFunctionType(), CI->getCalledValue(), Split, + UnwindEdge, InvokeArgs, OpBundles, CI->getName(), BB); II->setDebugLoc(CI->getDebugLoc()); II->setCallingConv(CI->getCallingConv()); II->setAttributes(CI->getAttributes()); |