Fix crash with constant initialization of bit-fields in unions.
llvm-svn: 71194
This commit is contained in:
parent
9157fbb6a6
commit
7ce29a18e1
|
@ -275,7 +275,7 @@ public:
|
|||
|
||||
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);
|
||||
|
||||
|
|
|
@ -10,3 +10,5 @@ void sqlite3CodeSubselect(){
|
|||
struct Token one = { 1 };
|
||||
}
|
||||
|
||||
typedef union T0 { char field0 : 2; } T0;
|
||||
T0 T0_values = { 0 };
|
||||
|
|
Loading…
Reference in New Issue