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:
parent
619c27a539
commit
33e9a6b565
5 changed files with 17 additions and 10 deletions
|
@ -428,6 +428,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
|||
|
||||
fn atomic_load(
|
||||
&mut self,
|
||||
ty: &'ll Type,
|
||||
ptr: &'ll Value,
|
||||
order: rustc_codegen_ssa::common::AtomicOrdering,
|
||||
size: Size,
|
||||
|
@ -435,6 +436,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
|||
unsafe {
|
||||
let load = llvm::LLVMRustBuildAtomicLoad(
|
||||
self.llbuilder,
|
||||
ty,
|
||||
ptr,
|
||||
UNNAMED,
|
||||
AtomicOrdering::from_generic(order),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue