mirror of
https://github.com/intel/llvm.git
synced 2026-01-31 16:29:50 +08:00
assert, don't crash, on int[]
llvm-svn: 39664
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user