diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-12-03 04:14:32 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-12-03 04:14:32 +0000 |
commit | 6da2c716017d5c8530ec99779524491ebc5dadb8 (patch) | |
tree | a18c0d51c83e68abf22cff9ce45ec00e51191594 /lib/CodeGen/CGCall.cpp | |
parent | 8bc27822fc867d43399d4474bccbb58b7b7c7ad7 (diff) |
Switch LValue so that it exposes alignment in CharUnits. (No functional change.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 5 |
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); |