about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorkhyperia <github@khyperia.com>2020-08-29 18:10:01 +0200
committerkhyperia <github@khyperia.com>2020-08-29 19:02:04 +0200
commit81650f485c8cafbb6f06d43e90236f34c53175cf (patch)
tree5369aab7687fdeb4504171d8b5dc7da1ccc915b7 /compiler/rustc_codegen_llvm/src
parent286a346d00ea534985195f3d72f4e1c5f3b07e2e (diff)
downloadrust-81650f485c8cafbb6f06d43e90236f34c53175cf.tar.gz
rust-81650f485c8cafbb6f06d43e90236f34c53175cf.zip
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 bools 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.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions