Darwin x86_32: Ignore padding bit-fields when looking for "single
element" structures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71266 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index eba5ff5..883eb5e 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -204,11 +204,15 @@
       if (AT->getSize().getZExtValue() == 1)
         FT = AT->getElementType();
 
-    if (isEmptyRecord(Context, FT)) {
-      // Ignore
-    } else if (Found) {
+    // Ignore empty records and padding bit-fields.
+    if (isEmptyRecord(Context, FT) || 
+        (FD->isBitField() && !FD->getIdentifier()))
+      continue;
+
+    if (Found)
       return 0;
-    } else if (!CodeGenFunction::hasAggregateLLVMType(FT)) {
+
+    if (!CodeGenFunction::hasAggregateLLVMType(FT)) {
       Found = FT.getTypePtr();
     } else {
       Found = isSingleElementStruct(FT, Context);