From c1d85b931ef9de9ca6e9a840e6c345bc19689b4e Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Sat, 3 Dec 2011 00:54:26 +0000 Subject: Track alignment in AggValueSlot. No functional change in this patch, but I'll be introducing uses of the specified alignment soon. llvm-svn: 145736 --- clang/lib/CodeGen/CodeGenFunction.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenFunction.h') diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 25436562e77..39a0bfc2f1e 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -1574,7 +1574,9 @@ public: /// CreateAggTemp - Create a temporary memory object for the given /// aggregate type. AggValueSlot CreateAggTemp(QualType T, const Twine &Name = "tmp") { - return AggValueSlot::forAddr(CreateMemTemp(T, Name), T.getQualifiers(), + unsigned Alignment = getContext().getTypeAlignInChars(T).getQuantity(); + return AggValueSlot::forAddr(CreateMemTemp(T, Name), Alignment, + T.getQualifiers(), AggValueSlot::IsNotDestructed, AggValueSlot::DoesNotNeedGCBarriers, AggValueSlot::IsNotAliased); -- cgit v1.2.3