summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-07-15 23:26:56 +0000
committerChris Lattner <sabre@nondot.org>2007-07-15 23:26:56 +0000
commit0e9d6226cac05ca0abdba6b7288542d05a5bfc2b (patch)
treee15779a47d072f5f2b3f40bf1ca3066a0a15a40a /clang/CodeGen/CodeGenModule.cpp
parentec6480e235819caeaf969da5b98a16a90a234ccd (diff)
downloadbcm5719-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/CodeGenModule.cpp')
-rw-r--r--clang/CodeGen/CodeGenModule.cpp2
1 files changed, 1 insertions, 1 deletions
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!");
OpenPOWER on IntegriCloud