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 | 590b6646ef747d2f7b42e5f40487ff07642d7b6f (patch) | |
tree | a87b3f67bb6e082d94e39f6e8530a91120e7a974 /CodeGen/CodeGenModule.cpp | |
parent | dda75cf84c5d3b1367f57ffaf45c4d3ed96630b3 (diff) |
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
Diffstat (limited to 'CodeGen/CodeGenModule.cpp')
-rw-r--r-- | CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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!"); |