about summary refs log tree commit diff
path: root/src/librustc_trans/builder.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_trans/builder.rs')
-rw-r--r--src/librustc_trans/builder.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_trans/builder.rs b/src/librustc_trans/builder.rs
index db803ca8209..49bcf9b88a0 100644
--- a/src/librustc_trans/builder.rs
+++ b/src/librustc_trans/builder.rs
@@ -590,13 +590,14 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
         }
     }
 
-    pub fn volatile_store(&self, val: ValueRef, ptr: ValueRef) -> ValueRef {
+    pub fn volatile_store(&self, val: ValueRef, ptr: ValueRef, align: Align) -> ValueRef {
         debug!("Store {:?} -> {:?}", Value(val), Value(ptr));
         assert!(!self.llbuilder.is_null());
         self.count_insn("store.volatile");
         let ptr = self.check_store(val, ptr);
         unsafe {
             let insn = llvm::LLVMBuildStore(self.llbuilder, val, ptr);
+            llvm::LLVMSetAlignment(insn, align.abi() as c_uint);
             llvm::LLVMSetVolatile(insn, llvm::True);
             insn
         }