From 590b6646ef747d2f7b42e5f40487ff07642d7b6f 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39884 91177308-0d34-0410-b5e6-96231b3b80d8 --- CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CodeGen/CodeGenModule.cpp') diff --git a/CodeGen/CodeGenModule.cpp b/CodeGen/CodeGenModule.cpp index 262469e34b..a1a498b082 100644 --- a/CodeGen/CodeGenModule.cpp +++ b/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-18-g5258