aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-11-18 00:28:11 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-11-18 00:28:11 +0000
commit5a4d35247f55dae6dd0d5ad349ecadbbea0b4572 (patch)
treed2aa42a58f2fa0fcdd04a5cc333d58a480d67a02 /lib/CodeGen/TargetInfo.cpp
parent88c2596edc8eb475e20f6033de1ea01669695a0c (diff)
Ignore empty unions in argument lowering on x86-32. From gcc struct layout tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144944 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInfo.cpp')
-rw-r--r--lib/CodeGen/TargetInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index c3d5ee19d6..b23ae304a8 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/lib/CodeGen/TargetInfo.cpp
@@ -700,8 +700,8 @@ ABIArgInfo X86_32ABIInfo::classifyArgumentType(QualType Ty) const {
return getIndirectResult(Ty);
}
- // Ignore empty structs.
- if (Ty->isStructureType() && getContext().getTypeSize(Ty) == 0)
+ // Ignore empty structs/unions.
+ if (Ty->isRecordType() && getContext().getTypeSize(Ty) == 0)
return ABIArgInfo::getIgnore();
// Expand small (<= 128-bit) record types when we know that the stack layout