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 | 8236bf1800641d1c296579e25218f68f74c5caac (patch) | |
tree | f6fcb4a5caaf01ecb467e7862c87948c48d63b58 /lib/CodeGen/CGCall.cpp | |
parent | 2e0011650fe149bf55916c6f25558bf9bfebf537 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71272 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 49c6f0e3a6..265bb7893b 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/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(); |