about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2024-04-07 21:14:01 +1000
committerZalathar <Zalathar@users.noreply.github.com>2024-04-07 21:27:53 +1000
commite38dfc49617086f31086f9d49275785d0ecc3d53 (patch)
treebb4b9fae63c37414e7f547345845f4da62d0f346 /compiler/rustc_llvm/llvm-wrapper
parent8f2c255ae03c524323a52d7003ac176beaa3ea74 (diff)
downloadrust-e38dfc49617086f31086f9d49275785d0ecc3d53.tar.gz
rust-e38dfc49617086f31086f9d49275785d0ecc3d53.zip
Remove unnecessary cast from `LLVMRustGetInstrProfIncrementIntrinsic`
This particular cast appears to have been copied over from clang, but there are
plenty of other call sites in clang that don't bother with a cast here, and it
works fine without one.

For context, `llvm::Intrinsic::ID` is a typedef for `unsigned`, and
`llvm::Intrinsic::instrprof_increment` is a member of
`enum IndependentIntrinsics : unsigned`.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
index 8ec1f5a99e7..a6894a7e089 100644
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -1524,8 +1524,8 @@ extern "C" LLVMValueRef LLVMRustBuildCall(LLVMBuilderRef B, LLVMTypeRef Ty, LLVM
 }
 
 extern "C" LLVMValueRef LLVMRustGetInstrProfIncrementIntrinsic(LLVMModuleRef M) {
-  return wrap(llvm::Intrinsic::getDeclaration(unwrap(M),
-              (llvm::Intrinsic::ID)llvm::Intrinsic::instrprof_increment));
+  return wrap(llvm::Intrinsic::getDeclaration(
+      unwrap(M), llvm::Intrinsic::instrprof_increment));
 }
 
 extern "C" LLVMValueRef LLVMRustBuildMemCpy(LLVMBuilderRef B,