summaryrefslogtreecommitdiffstats
path: root/clang/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
commite76b95ae1544f3bfdf71b5fca663a3819691cc67 (patch)
treeb077d14208ab831be623928158adc5c806aba784 /clang/lib/CodeGen/TargetInfo.cpp
parent68254fcbcabcee46500e941507f3d08665f3d9ae (diff)
downloadbcm5719-llvm-e76b95ae1544f3bfdf71b5fca663a3819691cc67.tar.gz
bcm5719-llvm-e76b95ae1544f3bfdf71b5fca663a3819691cc67.zip
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. llvm-svn: 131881
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 5ac5ea4ac40..cfd98601952 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud