From a0544d6fdf44a9a28ab324478fcf463d9e37a116 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Sat, 3 Dec 2011 04:14:32 +0000 Subject: Switch LValue so that it exposes alignment in CharUnits. (No functional change.) llvm-svn: 145753 --- clang/lib/CodeGen/CGCall.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CGCall.cpp') diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 93bc1753ce8..3457b5bc141 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/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); -- cgit v1.2.3