diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-05-08 22:26:44 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-05-08 22:26:44 +0000 |
commit | b997f3bcc32c00f01f67317092b534298115674f (patch) | |
tree | 13deac2176439ed3b88be604ce7ebad2e5e30c01 /clang/lib/CodeGen | |
parent | 4752783057b179fe9b9823875d7347ae68823418 (diff) | |
download | bcm5719-llvm-b997f3bcc32c00f01f67317092b534298115674f.tar.gz bcm5719-llvm-b997f3bcc32c00f01f67317092b534298115674f.zip |
x86_64 ABI: Ignore padding bit-fields during classification.
- {return-types,single-args}-{32,64} pass the first 1k ABI tests with
bit-fields enabled.
llvm-svn: 71272
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 49c6f0e3a61..265bb7893bb 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -205,8 +205,7 @@ static const Type *isSingleElementStruct(QualType T, ASTContext &Context) { FT = AT->getElementType(); // Ignore empty records and padding bit-fields. - if (isEmptyRecord(Context, FT) || - (FD->isBitField() && !FD->getIdentifier())) + if (isEmptyRecord(Context, FT) || FD->isUnnamedBitfield()) continue; if (Found) @@ -803,6 +802,10 @@ void X86_64ABIInfo::classify(QualType Ty, // structure to be passed in memory even if unaligned, and // therefore they can straddle an eightbyte. if (BitField) { + // Ignore padding bit-fields. + if (i->isUnnamedBitfield()) + continue; + uint64_t Offset = OffsetBase + Layout.getFieldOffset(idx); uint64_t Size = i->getBitWidth()->EvaluateAsInt(Context).getZExtValue(); |