aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-09-29 11:21:13 +0200
committerNikita Popov <npopov@redhat.com>2023-09-29 11:21:13 +0200
commit739c86df807748182e576e11697db6002738aafd (patch)
treedd83620b6c6c0b3caf5e954748281a5ef50f98be /llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
parent86dea5aab835f37b6e7c3b5a477c8a00881be62f (diff)
downloadllvm-739c86df807748182e576e11697db6002738aafd.zip
llvm-739c86df807748182e576e11697db6002738aafd.tar.gz
llvm-739c86df807748182e576e11697db6002738aafd.tar.bz2
[llvm] Use more explicit cast methods (NFC)
Instead of ConstantExpr::getCast() with a fixed opcode, use the corresponding getXYZ methods instead. For the one place creating a pointer bitcast drop it entirely, as this is redundant with opaque pointers.
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
index a0d81cd..adf3865 100644
--- a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
@@ -244,8 +244,7 @@ Constant* createIRTypedAddress(FunctionType &FT, ExecutorAddr Addr) {
Constant *AddrIntVal =
ConstantInt::get(Type::getInt64Ty(FT.getContext()), Addr.getValue());
Constant *AddrPtrVal =
- ConstantExpr::getCast(Instruction::IntToPtr, AddrIntVal,
- PointerType::get(&FT, 0));
+ ConstantExpr::getIntToPtr(AddrIntVal, PointerType::get(&FT, 0));
return AddrPtrVal;
}