diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2025-06-11 02:50:28 -0700 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2025-06-17 18:59:22 -0700 |
| commit | e4f196a7b43db0f35c9bea3956c2ed1ea1a751be (patch) | |
| tree | 8f0b24c76c6436bab55c8b0235f7af1f510b6697 /compiler/rustc_codegen_llvm/src/llvm_util.rs | |
| parent | e703dff8fe220b78195c53478e83fb2f68d8499c (diff) | |
| download | rust-e4f196a7b43db0f35c9bea3956c2ed1ea1a751be.tar.gz rust-e4f196a7b43db0f35c9bea3956c2ed1ea1a751be.zip | |
CodeGen: rework Aggregate implemention for rvalue_creates_operand cases
Another refactor pulled out from 138759 The previous implementation I'd written here based on `index_by_increasing_offset` is complicated to follow and difficult to extend to non-structs. This changes the implementation, without actually changing any codegen (thus no test changes either), to be more like the existing `extract_field` (<https://github.com/rust-lang/rust/blob/2b0274c71dba0e24370ebf65593da450e2e91868/compiler/rustc_codegen_ssa/src/mir/operand.rs#L345-L425>) in that it allows setting a particular field directly. Notably I've found this one much easier to get right, in particular because having the `OperandRef<Result<V, Scalar>>` gives a really useful thing to include in ICE messages if something did happen to go wrong.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
0 files changed, 0 insertions, 0 deletions
