aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 93bc1753ce..3457b5bc14 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -1060,8 +1060,9 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI,
// we need to create a temporary and reconstruct it from the
// arguments.
llvm::AllocaInst *Alloca = CreateMemTemp(Ty);
- Alloca->setAlignment(getContext().getDeclAlign(Arg).getQuantity());
- LValue LV = MakeAddrLValue(Alloca, Ty, Alloca->getAlignment());
+ CharUnits Align = getContext().getDeclAlign(Arg);
+ Alloca->setAlignment(Align.getQuantity());
+ LValue LV = MakeAddrLValue(Alloca, Ty, Align);
llvm::Function::arg_iterator End = ExpandTypeFromArgs(Ty, LV, AI);
EmitParmDecl(*Arg, Alloca, ArgNo);