diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-12-03 00:54:26 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-12-03 00:54:26 +0000 |
commit | c1d85b931ef9de9ca6e9a840e6c345bc19689b4e (patch) | |
tree | fef115b657d777df64cee28eced323e31252e725 /clang/lib/CodeGen/CGStmt.cpp | |
parent | c91d804af95f0162600aec0b2d3591d37e3a23f9 (diff) | |
download | bcm5719-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/CGStmt.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index 6f020ccab0f..adc0094e611 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -772,7 +772,9 @@ void CodeGenFunction::EmitReturnStmt(const ReturnStmt &S) { } else if (RV->getType()->isAnyComplexType()) { EmitComplexExprIntoAddr(RV, ReturnValue, false); } else { - EmitAggExpr(RV, AggValueSlot::forAddr(ReturnValue, Qualifiers(), + unsigned Alignment = + getContext().getTypeAlignInChars(RV->getType()).getQuantity(); + EmitAggExpr(RV, AggValueSlot::forAddr(ReturnValue, Alignment, Qualifiers(), AggValueSlot::IsDestructed, AggValueSlot::DoesNotNeedGCBarriers, AggValueSlot::IsNotAliased)); |