rust/compiler/rustc_codegen_llvm/src
Guillaume Gomez bffeb052d1
Rollup merge of #123021 - compiler-errors:coroutine-layout-lol, r=oli-obk
Make `TyCtxt::coroutine_layout` take coroutine's kind parameter

For coroutines that come from coroutine-closures (i.e. async closures), we may have two kinds of bodies stored in the coroutine; one that takes the closure's captures by reference, and one that takes the captures by move.

These currently have identical layouts, but if we do any optimization for these layouts that are related to the upvars, then they will diverge -- e.g. https://github.com/rust-lang/rust/pull/120168#discussion_r1536943728.

This PR relaxes the assertion I added in #121122, and instead make the `TyCtxt::coroutine_layout` method take the `coroutine_kind_ty` argument from the coroutine, which will allow us to differentiate these by-move and by-ref bodies.
2024-03-27 10:13:43 +01:00
..
back Add arm64ec-pc-windows-msvc target 2024-03-06 17:49:37 -08:00
coverageinfo coverage: Detect functions that have lost all their coverage statements 2024-03-26 11:46:04 +11:00
debuginfo Require coroutine kind type to be passed to TyCtxt::coroutine_layout 2024-03-24 21:12:49 -04:00
llvm Register LLVM handlers for bad-alloc / OOM 2024-03-15 15:49:06 -07:00
abi.rs copy byval argument to alloca if alignment is insufficient 2024-03-11 09:38:54 -04:00
allocator.rs Add -Zuse-sync-unwind 2023-12-31 15:27:43 +08:00
asm.rs CFI: Use Instance at callsites 2024-03-23 18:30:39 +00:00
attributes.rs is_closure_like 2024-02-11 22:09:52 +00:00
base.rs compiler: replace cstr macro with c str literals in compiler and few other c str replacements 2023-12-03 14:54:09 +03:00
builder.rs Auto merge of #122849 - clubby789:no-metadata, r=petrochenkov 2024-03-26 06:46:43 +00:00
callee.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
common.rs Fix 32-bit overflows in LLVM composite constants 2024-03-10 17:54:55 -04:00
consts.rs Some comment nits 2024-03-12 08:51:20 +00:00
context.rs Auto merge of #119552 - krtab:dead_code_priv_mod_pub_field, r=cjgillot,saethlin 2024-03-23 00:37:05 +00:00
declare.rs Instance is Copy 2024-03-25 13:58:40 -04:00
errors.rs Rename IntoDiagnostic as Diagnostic. 2024-03-11 09:15:09 +11:00
intrinsic.rs CFI: Use Instance at callsites 2024-03-23 18:30:39 +00:00
lib.rs compiler: use addr_of! 2024-02-24 18:53:48 +03:00
llvm_util.rs Register LLVM handlers for bad-alloc / OOM 2024-03-15 15:49:06 -07:00
mono_item.rs Some comment nits 2024-03-12 08:51:20 +00:00
type_.rs Fix 32-bit overflows in LLVM composite constants 2024-03-10 17:54:55 -04:00
type_of.rs Remove the unused field_remapping field from TypeLowering 2024-03-08 03:42:47 +00:00
va_arg.rs Add arm64ec-pc-windows-msvc target 2024-03-06 17:49:37 -08:00
value.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00