summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-12-03 04:14:32 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-12-03 04:14:32 +0000
commita0544d6fdf44a9a28ab324478fcf463d9e37a116 (patch)
tree19c35ff91754811a816dd29b050a034e549bf6f7 /clang/lib/CodeGen/CGCall.cpp
parentb2b0795c9fb3e01a60e5592a3ec8816a3d2addb0 (diff)
downloadbcm5719-llvm-a0544d6fdf44a9a28ab324478fcf463d9e37a116.tar.gz
bcm5719-llvm-a0544d6fdf44a9a28ab324478fcf463d9e37a116.zip
Switch LValue so that it exposes alignment in CharUnits. (No functional change.)
llvm-svn: 145753
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp5
1 files changed, 3 insertions, 2 deletions
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);
OpenPOWER on IntegriCloud