diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2023-05-07 03:00:41 -0700 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2023-05-31 19:10:28 -0700 |
| commit | bf36193ef6f8bc31cc2ae3ffe8ec9bfe0d3d29a8 (patch) | |
| tree | db59ccdba77d3aeac89616255764b65ce5603dab /compiler/rustc_codegen_llvm/src/builder.rs | |
| parent | 9af3865deca9c601ef32ef4ed29f7cae5fed50a9 (diff) | |
| download | rust-bf36193ef6f8bc31cc2ae3ffe8ec9bfe0d3d29a8.tar.gz rust-bf36193ef6f8bc31cc2ae3ffe8ec9bfe0d3d29a8.zip | |
Add a distinct `OperandValue::ZeroSized` variant for ZSTs
These tend to have special handling in a bunch of places anyway, so the variant helps remember that. And I think it's easier to grok than non-Scalar Aggregates sometimes being `Immediates` (like I got wrong and caused 109992). As a minor bonus, it means we don't need to generate poison LLVM values for them to pass around in `OperandValue::Immediate`s.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/builder.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs index 4d0bcd53d15..5968e70b1cc 100644 --- a/compiler/rustc_codegen_llvm/src/builder.rs +++ b/compiler/rustc_codegen_llvm/src/builder.rs @@ -486,7 +486,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { assert_eq!(place.llextra.is_some(), place.layout.is_unsized()); if place.layout.is_zst() { - return OperandRef::new_zst(self, place.layout); + return OperandRef::zero_sized(place.layout); } #[instrument(level = "trace", skip(bx))] |
