summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CodeGenTypes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/CodeGen/CodeGenTypes.cpp')
-rw-r--r--clang/CodeGen/CodeGenTypes.cpp2
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 {
OpenPOWER on IntegriCloud