diff options
author | Chris Lattner <sabre@nondot.org> | 2007-06-20 17:12:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-06-20 17:12:11 +0000 |
commit | e1e93a5e5d7b40bce2aeee851bfe48a705fbd186 (patch) | |
tree | af78f31a5dca9331a301a1590134717844817be5 /clang/CodeGen/CodeGenTypes.cpp | |
parent | b6984c485428a1e9564eb63296c1f8009ac8de00 (diff) | |
download | bcm5719-llvm-e1e93a5e5d7b40bce2aeee851bfe48a705fbd186.tar.gz bcm5719-llvm-e1e93a5e5d7b40bce2aeee851bfe48a705fbd186.zip |
assert, don't crash, on int[]
llvm-svn: 39664
Diffstat (limited to 'clang/CodeGen/CodeGenTypes.cpp')
-rw-r--r-- | clang/CodeGen/CodeGenTypes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/CodeGen/CodeGenTypes.cpp b/clang/CodeGen/CodeGenTypes.cpp index 330217ce6e7..e5f051dba45 100644 --- a/clang/CodeGen/CodeGenTypes.cpp +++ b/clang/CodeGen/CodeGenTypes.cpp @@ -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 { |