Index: test/CodeGen/arm-aapcs-zerolength-bitfield.c
===================================================================
--- test/CodeGen/arm-aapcs-zerolength-bitfield.c	(revision 152302)
+++ test/CodeGen/arm-aapcs-zerolength-bitfield.c	(working copy)
@@ -1,8 +1,4 @@
-// RUN: %clang_cc1 -target-abi apcs-gnu -triple armv7-apple-darwin10 %s -verify
-//
-// Note: gcc forces the alignment to 4 bytes, regardless of the type of the
-// zero length bitfield.
-// rdar://9859156
+// RUN: %clang_cc1 -target-abi aapcs -triple armv7-apple-darwin10 %s -verify
 
 #include <stddef.h>
 
@@ -12,8 +8,8 @@
   char : 0;
   char bar;
 };
-static int arr1_offset[(offsetof(struct t1, bar) == 4) ? 0 : -1];
-static int arr1_sizeof[(sizeof(struct t1) == 8) ? 0 : -1];
+static int arr1_offset[(offsetof(struct t1, bar) == 1) ? 0 : -1];
+static int arr1_sizeof[(sizeof(struct t1) == 4) ? 0 : -1];
 
 struct t2
 {
@@ -21,8 +17,8 @@
   short : 0;
   char bar;
 };
-static int arr2_offset[(offsetof(struct t2, bar) == 4) ? 0 : -1];
-static int arr2_sizeof[(sizeof(struct t2) == 8) ? 0 : -1];
+static int arr2_offset[(offsetof(struct t2, bar) == 2) ? 0 : -1];
+static int arr2_sizeof[(sizeof(struct t2) == 4) ? 0 : -1];
 
 struct t3
 {
@@ -48,8 +44,8 @@
   long long : 0;
   char bar;
 };
-static int arr5_offset[(offsetof(struct t5, bar) == 4) ? 0 : -1];
-static int arr5_sizeof[(sizeof(struct t5) == 8) ? 0 : -1];
+static int arr5_offset[(offsetof(struct t5, bar) == 8) ? 0 : -1];
+static int arr5_sizeof[(sizeof(struct t5) == 16) ? 0 : -1];
 
 struct t6
 {
@@ -58,8 +54,8 @@
   char bar : 1;
   char bar2;
 };
-static int arr6_offset[(offsetof(struct t6, bar2) == 5) ? 0 : -1];
-static int arr6_sizeof[(sizeof(struct t6) == 8) ? 0 : -1];
+static int arr6_offset[(offsetof(struct t6, bar2) == 2) ? 0 : -1];
+static int arr6_sizeof[(sizeof(struct t6) == 4) ? 0 : -1];
 
 struct t7
 {
@@ -68,8 +64,8 @@
   char bar1 : 1;
   char bar2;
 };
-static int arr7_offset[(offsetof(struct t7, bar2) == 5) ? 0 : -1];
-static int arr7_sizeof[(sizeof(struct t7) == 8) ? 0 : -1];
+static int arr7_offset[(offsetof(struct t7, bar2) == 3) ? 0 : -1];
+static int arr7_sizeof[(sizeof(struct t7) == 4) ? 0 : -1];
 
 struct t8
 {
@@ -98,8 +94,8 @@
   char bar1 : 1;
   char bar2;
 };
-static int arr10_offset[(offsetof(struct t10, bar2) == 5) ? 0 : -1];
-static int arr10_sizeof[(sizeof(struct t10) == 8) ? 0 : -1];
+static int arr10_offset[(offsetof(struct t10, bar2) == 9) ? 0 : -1];
+static int arr10_sizeof[(sizeof(struct t10) == 16) ? 0 : -1];
 
 struct t11
 {
@@ -109,8 +105,8 @@
   char bar1 : 1;
   char bar2;
 };
-static int arr11_offset[(offsetof(struct t11, bar2) == 5) ? 0 : -1];
-static int arr11_sizeof[(sizeof(struct t11) == 8) ? 0 : -1];
+static int arr11_offset[(offsetof(struct t11, bar2) == 9) ? 0 : -1];
+static int arr11_sizeof[(sizeof(struct t11) == 16) ? 0 : -1];
 
 struct t12
 {
@@ -120,8 +116,8 @@
   char : 0;
   char bar;
 };
-static int arr12_offset[(offsetof(struct t12, bar) == 4) ? 0 : -1];
-static int arr12_sizeof[(sizeof(struct t12) == 8) ? 0 : -1];
+static int arr12_offset[(offsetof(struct t12, bar) == 8) ? 0 : -1];
+static int arr12_sizeof[(sizeof(struct t12) == 16) ? 0 : -1];
 
 struct t13
 {
@@ -228,11 +224,11 @@
   short foo7: 16;
   short foo8: 16;
 };
-static int arr21_bar1_offset[(offsetof(struct t21, bar1) == 8) ? 0 : -1];
-static int arr21_bar2_offset[(offsetof(struct t21, bar2) == 12) ? 0 : -1];
-static int arr21_bar3_offset[(offsetof(struct t21, bar3) == 16) ? 0 : -1];
-static int arr21_bar4_offset[(offsetof(struct t21, bar4) == 32) ? 0 : -1];
-static int arr21_sizeof[(sizeof(struct t21) == 44) ? 0 : -1];
+static int arr21_bar1_offset[(offsetof(struct t21, bar1) == 4) ? 0 : -1];
+static int arr21_bar2_offset[(offsetof(struct t21, bar2) == 8) ? 0 : -1];
+static int arr21_bar3_offset[(offsetof(struct t21, bar3) == 12) ? 0 : -1];
+static int arr21_bar4_offset[(offsetof(struct t21, bar4) == 28) ? 0 : -1];
+static int arr21_sizeof[(sizeof(struct t21) == 40) ? 0 : -1];
 
 int main() {
   return 0;
Index: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp	(revision 152302)
+++ lib/Basic/Targets.cpp	(working copy)
@@ -2653,6 +2653,12 @@
     // ARM has atomics up to 8 bytes
     // FIXME: Set MaxAtomicInlineWidth if we have the feature v6e
     MaxAtomicPromoteWidth = 64;
+
+    // Do force alignment of members that follow zero length bitfields.  If
+    // the alignment of the zero-length bitfield is greater than the member 
+    // that follows it, `bar', `bar' will be aligned as the  type of the 
+    // zero length bitfield.
+    UseZeroLengthBitfieldAlignment = true;
   }
   virtual const char *getABI() const { return ABI.c_str(); }
   virtual bool setABI(const std::string &Name) {
@@ -2673,12 +2679,6 @@
       // structures. This corresponds to PCC_BITFIELD_TYPE_MATTERS in gcc.
       UseBitFieldTypeAlignment = false;
 
-      /// Do force alignment of members that follow zero length bitfields.  If
-      /// the alignment of the zero-length bitfield is greater than the member 
-      /// that follows it, `bar', `bar' will be aligned as the  type of the 
-      /// zero length bitfield.
-      UseZeroLengthBitfieldAlignment = true;
-
       /// gcc forces the alignment to 4 bytes, regardless of the type of the
       /// zero length bitfield.  This corresponds to EMPTY_FIELD_BOUNDARY in
       /// gcc.
