Fix crash with constant initialization of bit-fields in unions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71194 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index e618dab..1639ac0 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -275,7 +275,7 @@
 
     if (curField->isBitField()) {
       // Create a dummy struct for bit-field insertion
-      unsigned NumElts = CGM.getTargetData().getTypePaddedSize(Ty) / 8;
+      unsigned NumElts = CGM.getTargetData().getTypePaddedSize(Ty);
       llvm::Constant* NV = llvm::Constant::getNullValue(llvm::Type::Int8Ty);
       std::vector<llvm::Constant*> Elts(NumElts, NV);