aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCXX.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-08 01:29:18 +0000
committerOwen Anderson <resistor@mac.com>2009-07-08 01:29:18 +0000
commitc14f0d230257a8db58aee6329116a7e245e6bbd6 (patch)
treecadffb2828366c1f4bedfed7bc142ca0d19815f4 /lib/CodeGen/CGCXX.cpp
parent082b02e8403d3ee9d2ded969fbe0e5d472f04cd8 (diff)
Update for LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74986 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r--lib/CodeGen/CGCXX.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index 5f3acea767..21cea75da4 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -20,6 +20,7 @@
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
+#include "llvm/Module.h"
#include "llvm/ADT/StringExtras.h"
using namespace clang;
using namespace CodeGen;
@@ -38,7 +39,8 @@ CodeGenFunction::GenerateStaticCXXBlockVarDeclInit(const VarDecl &D,
// Create the guard variable.
llvm::GlobalValue *GuardV =
- new llvm::GlobalVariable(llvm::Type::Int64Ty, false,
+ new llvm::GlobalVariable(CGM.getModule().getContext(),
+ llvm::Type::Int64Ty, false,
GV->getLinkage(),
llvm::Constant::getNullValue(llvm::Type::Int64Ty),
GuardVName.c_str(),