diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-05-30 10:04:35 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-05-30 10:12:57 +0000 |
| commit | f383b17668e0f564aae978f01d8eef7b115aa8ca (patch) | |
| tree | 90666b48bc2f6510e7ca9e3a854c09e33ebcd475 | |
| parent | 6c6c31d46184b8a566f4213ef6037615e96227c1 (diff) | |
| download | rust-f383b17668e0f564aae978f01d8eef7b115aa8ca.tar.gz rust-f383b17668e0f564aae978f01d8eef7b115aa8ca.zip | |
Directly use from_immediate for handling bool
| -rw-r--r-- | src/intrinsic/mod.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/intrinsic/mod.rs b/src/intrinsic/mod.rs index 2b1dca72d06..73be25ba92b 100644 --- a/src/intrinsic/mod.rs +++ b/src/intrinsic/mod.rs @@ -498,13 +498,10 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tc }; if result.layout.ty.is_bool() { - OperandRef::from_immediate_or_packed_pair(self, value, result.layout) - .val - .store(self, result); + let val = self.from_immediate(value); + self.store_to_place(val, result.val); } else if !result.layout.ty.is_unit() { - let ptr_llty = self.type_ptr_to(result.layout.gcc_type(self)); - let ptr = self.pointercast(result.val.llval, ptr_llty); - self.store(value, ptr, result.val.align); + self.store_to_place(value, result.val); } Ok(()) } |
