assert, don't crash, on int[]

llvm-svn: 39664
This commit is contained in:
Chris Lattner
2007-06-20 17:12:11 +00:00
parent b6984c4854
commit e1e93a5e5d

View File

@@ -84,7 +84,7 @@ const llvm::Type *CodeGenTypes::ConvertType(QualType T, SourceLocation Loc) {
"FIXME: We only handle trivial array types so far!");
llvm::APSInt Size(32);
if (A.getSize()->isIntegerConstantExpr(Size)) {
if (A.getSize() && A.getSize()->isIntegerConstantExpr(Size)) {
const llvm::Type *EltTy = ConvertType(A.getElementType(), Loc);
return llvm::ArrayType::get(EltTy, Size.getZExtValue());
} else {