Skip to content

Commit fdfca76

Browse files
committed
fixup: use Bool instead of bool
1 parent c0bc001 commit fdfca76

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

compiler/rustc_codegen_llvm/src/builder.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::abi::FnAbiLlvmExt;
22
use crate::attributes;
33
use crate::common::Funclet;
44
use crate::context::CodegenCx;
5-
use crate::llvm::{self, AtomicOrdering, AtomicRmwBinOp, BasicBlock};
5+
use crate::llvm::{self, AtomicOrdering, AtomicRmwBinOp, BasicBlock, False, True};
66
use crate::type_::Type;
77
use crate::type_of::LayoutLlvmExt;
88
use crate::value::Value;
@@ -841,7 +841,15 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
841841
}
842842

843843
fn intcast(&mut self, val: &'ll Value, dest_ty: &'ll Type, is_signed: bool) -> &'ll Value {
844-
unsafe { llvm::LLVMBuildIntCast2(self.llbuilder, val, dest_ty, is_signed, UNNAMED) }
844+
unsafe {
845+
llvm::LLVMBuildIntCast2(
846+
self.llbuilder,
847+
val,
848+
dest_ty,
849+
if is_signed { True } else { False },
850+
UNNAMED,
851+
)
852+
}
845853
}
846854

847855
fn pointercast(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value {

compiler/rustc_codegen_llvm/src/llvm/ffi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1626,7 +1626,7 @@ extern "C" {
16261626
B: &Builder<'a>,
16271627
Val: &'a Value,
16281628
DestTy: &'a Type,
1629-
IsSigned: bool,
1629+
IsSigned: Bool,
16301630
Name: *const c_char,
16311631
) -> &'a Value;
16321632

0 commit comments

Comments
 (0)