summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGException.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-12-03 00:54:26 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-12-03 00:54:26 +0000
commitc1d85b931ef9de9ca6e9a840e6c345bc19689b4e (patch)
treefef115b657d777df64cee28eced323e31252e725 /clang/lib/CodeGen/CGException.cpp
parentc91d804af95f0162600aec0b2d3591d37e3a23f9 (diff)
downloadbcm5719-llvm-c1d85b931ef9de9ca6e9a840e6c345bc19689b4e.tar.gz
bcm5719-llvm-c1d85b931ef9de9ca6e9a840e6c345bc19689b4e.zip
Track alignment in AggValueSlot. No functional change in this patch, but I'll be introducing uses of the specified alignment soon.
llvm-svn: 145736
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r--clang/lib/CodeGen/CGException.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index 15fc6a1e599..3a7b4d4107b 100644
--- a/clang/lib/CodeGen/CGException.cpp
+++ b/clang/lib/CodeGen/CGException.cpp
@@ -1039,10 +1039,12 @@ static void InitCatchParam(CodeGenFunction &CGF,
CGF.EHStack.pushTerminate();
// Perform the copy construction.
- CGF.EmitAggExpr(copyExpr, AggValueSlot::forAddr(ParamAddr, Qualifiers(),
- AggValueSlot::IsNotDestructed,
- AggValueSlot::DoesNotNeedGCBarriers,
- AggValueSlot::IsNotAliased));
+ unsigned Alignment = CGF.getContext().getDeclAlign(&CatchParam).getQuantity();
+ CGF.EmitAggExpr(copyExpr,
+ AggValueSlot::forAddr(ParamAddr, Alignment, Qualifiers(),
+ AggValueSlot::IsNotDestructed,
+ AggValueSlot::DoesNotNeedGCBarriers,
+ AggValueSlot::IsNotAliased));
// Leave the terminate scope.
CGF.EHStack.popTerminate();
OpenPOWER on IntegriCloud