Pass type when creating atomic load

Instead of determining it from the pointer type, explicitly pass
the type to load.
This commit is contained in:
Nikita Popov
2021-07-04 17:49:51 +02:00
parent 619c27a539
commit 33e9a6b565
5 changed files with 17 additions and 10 deletions

View File

@@ -139,7 +139,13 @@ pub trait BuilderMethods<'a, 'tcx>:
fn load(&mut self, ptr: Self::Value, align: Align) -> Self::Value;
fn volatile_load(&mut self, ptr: Self::Value) -> Self::Value;
fn atomic_load(&mut self, ptr: Self::Value, order: AtomicOrdering, size: Size) -> Self::Value;
fn atomic_load(
&mut self,
ty: Self::Type,
ptr: Self::Value,
order: AtomicOrdering,
size: Size,
) -> Self::Value;
fn load_operand(&mut self, place: PlaceRef<'tcx, Self::Value>)
-> OperandRef<'tcx, Self::Value>;