From 0e9d6226cac05ca0abdba6b7288542d05a5bfc2b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 15 Jul 2007 23:26:56 +0000 Subject: Refactor code so that isIntegerConstantExpr has an ASTContext available. llvm-svn: 39884 --- clang/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/CodeGen/CodeGenModule.cpp') diff --git a/clang/CodeGen/CodeGenModule.cpp b/clang/CodeGen/CodeGenModule.cpp index 262469e34be..a1a498b0828 100644 --- a/clang/CodeGen/CodeGenModule.cpp +++ b/clang/CodeGen/CodeGenModule.cpp @@ -70,7 +70,7 @@ void CodeGenModule::EmitGlobalVar(const FileVarDecl *D) { } else if (D->getType()->isIntegerType()) { llvm::APSInt Value(getContext().getTypeSize(D->getInit()->getType(), SourceLocation())); - if (D->getInit()->isIntegerConstantExpr(Value)) + if (D->getInit()->isIntegerConstantExpr(Value, Context)) Init = llvm::ConstantInt::get(Value); } assert(Init && "FIXME: Global variable initializers unimp!"); -- cgit v1.2.3