Skip to content

Commit e38dfc4

Browse files
committed
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`.
1 parent 8f2c255 commit e38dfc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1524,8 +1524,8 @@ extern "C" LLVMValueRef LLVMRustBuildCall(LLVMBuilderRef B, LLVMTypeRef Ty, LLVM
15241524
}
15251525

15261526
extern "C" LLVMValueRef LLVMRustGetInstrProfIncrementIntrinsic(LLVMModuleRef M) {
1527-
return wrap(llvm::Intrinsic::getDeclaration(unwrap(M),
1528-
(llvm::Intrinsic::ID)llvm::Intrinsic::instrprof_increment));
1527+
return wrap(llvm::Intrinsic::getDeclaration(
1528+
unwrap(M), llvm::Intrinsic::instrprof_increment));
15291529
}
15301530

15311531
extern "C" LLVMValueRef LLVMRustBuildMemCpy(LLVMBuilderRef B,

0 commit comments

Comments
 (0)