Replace the llvm::Bool typedef with a proper newtype
This commit is contained in:
@@ -20,7 +20,7 @@ use tracing::debug;
|
||||
use crate::consts::const_alloc_to_llvm;
|
||||
pub(crate) use crate::context::CodegenCx;
|
||||
use crate::context::{GenericCx, SCx};
|
||||
use crate::llvm::{self, BasicBlock, Bool, ConstantInt, False, Metadata, True};
|
||||
use crate::llvm::{self, BasicBlock, ConstantInt, False, Metadata, ToLlvmBool, True};
|
||||
use crate::type_::Type;
|
||||
use crate::value::Value;
|
||||
|
||||
@@ -392,7 +392,7 @@ fn struct_in_context<'ll>(
|
||||
packed: bool,
|
||||
) -> &'ll Value {
|
||||
let len = c_uint::try_from(elts.len()).expect("LLVMConstStructInContext elements len overflow");
|
||||
unsafe { llvm::LLVMConstStructInContext(llcx, elts.as_ptr(), len, packed as Bool) }
|
||||
unsafe { llvm::LLVMConstStructInContext(llcx, elts.as_ptr(), len, packed.to_llvm_bool()) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user