Instead of round up sizes to '8', round them up to the alignment of the char
type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127391 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/RecordLayoutBuilder.cpp b/lib/AST/RecordLayoutBuilder.cpp
index ecaa1f6..016b405 100644
--- a/lib/AST/RecordLayoutBuilder.cpp
+++ b/lib/AST/RecordLayoutBuilder.cpp
@@ -1301,7 +1301,8 @@
 
     uint64_t NewSizeInBits = FieldOffset + FieldSize;
 
-    setDataSize(llvm::RoundUpToAlignment(NewSizeInBits, 8));
+    setDataSize(llvm::RoundUpToAlignment(NewSizeInBits, 
+                                         Context.Target.getCharAlign()));
     UnfilledBitsInLastByte = getDataSizeInBits() - NewSizeInBits;
   }
 
@@ -1378,7 +1379,8 @@
   } else {
     uint64_t NewSizeInBits = FieldOffset + FieldSize;
 
-    setDataSize(llvm::RoundUpToAlignment(NewSizeInBits, 8));
+    setDataSize(llvm::RoundUpToAlignment(NewSizeInBits, 
+                                         Context.Target.getCharAlign()));
     UnfilledBitsInLastByte = getDataSizeInBits() - NewSizeInBits;
   }