aboutsummaryrefslogtreecommitdiff
path: root/CodeGen/CodeGenTypes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CodeGen/CodeGenTypes.cpp')
-rw-r--r--CodeGen/CodeGenTypes.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/CodeGen/CodeGenTypes.cpp b/CodeGen/CodeGenTypes.cpp
index 5bae791080..22ee504662 100644
--- a/CodeGen/CodeGenTypes.cpp
+++ b/CodeGen/CodeGenTypes.cpp
@@ -85,7 +85,8 @@ const llvm::Type *CodeGenTypes::ConvertType(QualType T) {
"FIXME: We only handle trivial array types so far!");
llvm::APSInt Size(32);
- if (A.getSizeExpr() && A.getSizeExpr()->isIntegerConstantExpr(Size)) {
+ if (A.getSizeExpr() &&
+ A.getSizeExpr()->isIntegerConstantExpr(Size, Context)) {
const llvm::Type *EltTy = ConvertType(A.getElementType());
return llvm::ArrayType::get(EltTy, Size.getZExtValue());
} else {