aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/NaCl/ExpandVarArgs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/NaCl/ExpandVarArgs.cpp')
-rw-r--r--lib/Transforms/NaCl/ExpandVarArgs.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/NaCl/ExpandVarArgs.cpp b/lib/Transforms/NaCl/ExpandVarArgs.cpp
index 1b605b79ee..6f41046850 100644
--- a/lib/Transforms/NaCl/ExpandVarArgs.cpp
+++ b/lib/Transforms/NaCl/ExpandVarArgs.cpp
@@ -240,7 +240,8 @@ static bool ExpandVarArgCall(InstType *Call, DataLayout *DL) {
// start of the function so that we don't leak space if the function
// is called in a loop.
Function *Func = Call->getParent()->getParent();
- Instruction *Buf = new AllocaInst(VarArgsTy, "vararg_buffer");
+ AllocaInst *Buf = new AllocaInst(VarArgsTy, "vararg_buffer");
+ Buf->setAlignment(8); // XXX EMSCRIPTEN: Align for 8-byte aligned doubles.
Func->getEntryBlock().getInstList().push_front(Buf);
// Call llvm.lifetime.start/end intrinsics to indicate that Buf is