forked from OSchip/llvm-project
parent
70381a7b18
commit
e073177e06
|
@ -2601,9 +2601,7 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var,
|
|||
if (T->isIncompleteArrayType()) {
|
||||
|
||||
// CodeGen turns int[] into int[1] so we'll do the same here.
|
||||
llvm::APSInt ConstVal(32);
|
||||
|
||||
ConstVal = 1;
|
||||
llvm::APInt ConstVal(32, 1);
|
||||
QualType ET = CGM.getContext().getAsArrayType(T)->getElementType();
|
||||
|
||||
T = CGM.getContext().getConstantArrayType(ET, ConstVal,
|
||||
|
@ -2637,9 +2635,7 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var,
|
|||
if (T->isIncompleteArrayType()) {
|
||||
|
||||
// CodeGen turns int[] into int[1] so we'll do the same here.
|
||||
llvm::APSInt ConstVal(32);
|
||||
|
||||
ConstVal = 1;
|
||||
llvm::APInt ConstVal(32, 1);
|
||||
QualType ET = CGM.getContext().getAsArrayType(T)->getElementType();
|
||||
|
||||
T = CGM.getContext().getConstantArrayType(ET, ConstVal,
|
||||
|
|
|
@ -92,8 +92,7 @@ static void CheckStringInit(Expr *Str, QualType &DeclT, const ArrayType *AT,
|
|||
if (const IncompleteArrayType *IAT = dyn_cast<IncompleteArrayType>(AT)) {
|
||||
// C99 6.7.8p14. We have an array of character type with unknown size
|
||||
// being initialized to a string literal.
|
||||
llvm::APSInt ConstVal(32);
|
||||
ConstVal = StrLength;
|
||||
llvm::APInt ConstVal(32, StrLength);
|
||||
// Return a new array type (C99 6.7.8p22).
|
||||
DeclT = S.Context.getConstantArrayType(IAT->getElementType(),
|
||||
ConstVal,
|
||||
|
|
Loading…
Reference in New Issue