diff options
author | Chris Lattner <sabre@nondot.org> | 2007-07-15 23:26:56 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-07-15 23:26:56 +0000 |
commit | 0e9d6226cac05ca0abdba6b7288542d05a5bfc2b (patch) | |
tree | e15779a47d072f5f2b3f40bf1ca3066a0a15a40a /clang/CodeGen/CodeGenTypes.cpp | |
parent | ec6480e235819caeaf969da5b98a16a90a234ccd (diff) | |
download | bcm5719-llvm-0e9d6226cac05ca0abdba6b7288542d05a5bfc2b.tar.gz bcm5719-llvm-0e9d6226cac05ca0abdba6b7288542d05a5bfc2b.zip |
Refactor code so that isIntegerConstantExpr has an ASTContext available.
llvm-svn: 39884
Diffstat (limited to 'clang/CodeGen/CodeGenTypes.cpp')
-rw-r--r-- | clang/CodeGen/CodeGenTypes.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/CodeGen/CodeGenTypes.cpp b/clang/CodeGen/CodeGenTypes.cpp index 5bae791080b..22ee5046623 100644 --- a/clang/CodeGen/CodeGenTypes.cpp +++ b/clang/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 { |