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
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 49c6f0e..265bb78 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -205,8 +205,7 @@
         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 @@
       // 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();