From 642a705f714eaa73875b9bc9e7848568efc4b890 Mon Sep 17 00:00:00 2001 From: Scott McMurray Date: Sat, 15 Feb 2025 10:24:24 -0800 Subject: PR feedback --- compiler/rustc_codegen_llvm/src/builder.rs | 4 ++-- compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'compiler/rustc_codegen_llvm/src') diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs index 18bb6a609aa..5d1a133e808 100644 --- a/compiler/rustc_codegen_llvm/src/builder.rs +++ b/compiler/rustc_codegen_llvm/src/builder.rs @@ -946,7 +946,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { let trunc = self.trunc(val, dest_ty); if llvm_util::get_version() >= (19, 0, 0) { unsafe { - if llvm::LLVMIsATruncInst(trunc).is_some() { + if llvm::LLVMIsAInstruction(trunc).is_some() { llvm::LLVMSetNUW(trunc, True); } } @@ -958,7 +958,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { let trunc = self.trunc(val, dest_ty); if llvm_util::get_version() >= (19, 0, 0) { unsafe { - if llvm::LLVMIsATruncInst(trunc).is_some() { + if llvm::LLVMIsAInstruction(trunc).is_some() { llvm::LLVMSetNSW(trunc, True); } } diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs index 1e105e86189..3b0187b9d37 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -1165,7 +1165,6 @@ unsafe extern "C" { // Operations on instructions pub(crate) fn LLVMIsAInstruction(Val: &Value) -> Option<&Value>; - pub(crate) fn LLVMIsATruncInst(Val: &Value) -> Option<&Value>; pub(crate) fn LLVMGetFirstBasicBlock(Fn: &Value) -> &BasicBlock; pub(crate) fn LLVMGetOperand(Val: &Value, Index: c_uint) -> Option<&Value>; -- cgit 1.4.1-3-g733a5