aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-05-22 23:35:00 +0000
committerChris Lattner <sabre@nondot.org>2011-05-22 23:35:00 +0000
commitde92d739ba0ef42a5a7dcfd6e170329549d0716b (patch)
treeffb78fa8d8c08732ff1aa3d77291944ca885e2c9 /lib/CodeGen/TargetInfo.cpp
parent855d227967f8332237f1f1cf8eb63a1e22d8be05 (diff)
make the x86-32 backend specify a byval alignment, even when the
code generator will do it. With this patch, clang compiles the example in PR9794 to not have an alloca temporary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131881 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInfo.cpp')
-rw-r--r--lib/CodeGen/TargetInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index 5ac5ea4ac4..cfd9860195 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/lib/CodeGen/TargetInfo.cpp
@@ -648,7 +648,7 @@ ABIArgInfo X86_32ABIInfo::getIndirectResult(QualType Ty, bool ByVal) const {
unsigned TypeAlign = getContext().getTypeAlign(Ty) / 8;
unsigned StackAlign = getTypeStackAlignInBytes(Ty, TypeAlign);
if (StackAlign == 0)
- return ABIArgInfo::getIndirect(0);
+ return ABIArgInfo::getIndirect(4);
// If the stack alignment is less than the type alignment, realign the
// argument.