diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-11-18 00:28:11 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-11-18 00:28:11 +0000 |
commit | 9f061a37bb6e27314cb95c1750704d68403971f9 (patch) | |
tree | 299dc873f15542f0db309d60c7063e07efdab0fa /clang/lib/CodeGen/TargetInfo.cpp | |
parent | 841dd8861ad46c7efc00e9e8121f4af204c36e96 (diff) | |
download | bcm5719-llvm-9f061a37bb6e27314cb95c1750704d68403971f9.tar.gz bcm5719-llvm-9f061a37bb6e27314cb95c1750704d68403971f9.zip |
Ignore empty unions in argument lowering on x86-32. From gcc struct layout tests.
llvm-svn: 144944
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index c3d5ee19d68..b23ae304a82 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/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 |