diff options
| author | bors <bors@rust-lang.org> | 2025-08-25 10:31:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-08-25 10:31:32 +0000 |
| commit | b779120cad2c93e53c0dfb7007c1214b2b275183 (patch) | |
| tree | ba5b4180a9ad18539d0ac71e934e8523cea065bb /compiler/rustc_codegen_llvm/src/common.rs | |
| parent | ee361e8fca1c30e13e7a31cc82b64c045339d3a8 (diff) | |
| parent | 0119d1611d48a45c66763eba7f21043fe3372581 (diff) | |
| download | rust-b779120cad2c93e53c0dfb7007c1214b2b275183.tar.gz rust-b779120cad2c93e53c0dfb7007c1214b2b275183.zip | |
Auto merge of #145844 - Zalathar:rollup-4kdll9t, r=Zalathar
Rollup of 10 pull requests Successful merges: - rust-lang/rust#135761 (Dial down detail of B-tree description) - rust-lang/rust#145620 (Account for impossible bounds making seemingly unsatisfyable dyn-to-dyn casts) - rust-lang/rust#145788 (Fix attribute target checking for macro calls) - rust-lang/rust#145794 (bootstrap.py: Improve CPU detection on NetBSD) - rust-lang/rust#145817 (cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype) - rust-lang/rust#145820 (raw-dylib-elf: set correct `DT_VERDEFNUM`) - rust-lang/rust#145828 (Update `bitflags` to 2.9.3.) - rust-lang/rust#145830 (Remove the lifetime from `ExpTokenPair`/`SeqSep`.) - rust-lang/rust#145836 (Remove outdated bug comments) - rust-lang/rust#145842 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/common.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/common.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_llvm/src/common.rs b/compiler/rustc_codegen_llvm/src/common.rs index f29fefb66f0..11b79a7fe68 100644 --- a/compiler/rustc_codegen_llvm/src/common.rs +++ b/compiler/rustc_codegen_llvm/src/common.rs @@ -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, TRUE, ToLlvmBool}; use crate::type_::Type; use crate::value::Value; @@ -158,7 +158,7 @@ impl<'ll, 'tcx> ConstCodegenMethods for CodegenCx<'ll, 'tcx> { self.type_kind(t) == TypeKind::Integer, "only allows integer types in const_int" ); - unsafe { llvm::LLVMConstInt(t, i as u64, True) } + unsafe { llvm::LLVMConstInt(t, i as u64, TRUE) } } fn const_u8(&self, i: u8) -> &'ll Value { @@ -192,7 +192,7 @@ impl<'ll, 'tcx> ConstCodegenMethods for CodegenCx<'ll, 'tcx> { self.type_kind(t) == TypeKind::Integer, "only allows integer types in const_uint" ); - unsafe { llvm::LLVMConstInt(t, i, False) } + unsafe { llvm::LLVMConstInt(t, i, FALSE) } } fn const_uint_big(&self, t: &'ll Type, u: u128) -> &'ll Value { @@ -377,7 +377,7 @@ pub(crate) fn val_ty(v: &Value) -> &Type { pub(crate) fn bytes_in_context<'ll>(llcx: &'ll llvm::Context, bytes: &[u8]) -> &'ll Value { unsafe { let ptr = bytes.as_ptr() as *const c_char; - llvm::LLVMConstStringInContext2(llcx, ptr, bytes.len(), True) + llvm::LLVMConstStringInContext2(llcx, ptr, bytes.len(), TRUE) } } @@ -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] |
