mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 19:17:43 +00:00
![]() Make to_immediate/from_immediate configurable by backends `librustc_codegen_ssa` has the concept of an immediate vs. memory type, and `librustc_codegen_llvm` uses this distinction to implement `bool`s being `i8` in memory, and `i1` in immediate contexts. However, some of that implementation leaked into `codegen_ssa` when converting to/from immediate values. So, move those methods into builder traits, so that behavior can be configured by backends. This is useful if a backend is able to keep bools as bools, or, needs to do more trickery than just bools to bytes. (Note that there's already a large amount of things abstracted with "immediate types" - this is just bringing this particular thing in line to be abstracted as well) --- Pinging @eddyb since that's who I was talking about this change with when they suggested I submit a PR. |
||
---|---|---|
.. | ||
back | ||
coverageinfo | ||
debuginfo | ||
llvm | ||
abi.rs | ||
allocator.rs | ||
asm.rs | ||
attributes.rs | ||
base.rs | ||
builder.rs | ||
callee.rs | ||
common.rs | ||
consts.rs | ||
context.rs | ||
declare.rs | ||
intrinsic.rs | ||
lib.rs | ||
llvm_util.rs | ||
metadata.rs | ||
mono_item.rs | ||
type_.rs | ||
type_of.rs | ||
va_arg.rs | ||
value.rs |