summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBlocks.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
commit9f211fb4fac722ef78d173f1611b02ea3726d8c5 (patch)
treee71d35d0c5be800d14e860d0acddf78c62a8d9af /clang/lib/CodeGen/CGBlocks.cpp
parent5948fdf68b5a1a68e8dbc10d28ef77473d5fc774 (diff)
downloadbcm5719-llvm-9f211fb4fac722ef78d173f1611b02ea3726d8c5.tar.gz
bcm5719-llvm-9f211fb4fac722ef78d173f1611b02ea3726d8c5.zip
Update for LLVM API change.
llvm-svn: 74986
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index d5f803ba98b..8de3518406d 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -50,7 +50,7 @@ BuildDescriptorBlockDecl(bool BlockHasCopyDispose, uint64_t Size,
C = llvm::ConstantStruct::get(Elts);
- C = new llvm::GlobalVariable(C->getType(), true,
+ C = new llvm::GlobalVariable(CGM.getModule().getContext(), C->getType(), true,
llvm::GlobalValue::InternalLinkage,
C, "__block_descriptor_tmp", &CGM.getModule());
return C;
@@ -165,7 +165,8 @@ llvm::Value *CodeGenFunction::BuildBlockLiteralTmp(const BlockExpr *BE) {
char Name[32];
sprintf(Name, "__block_holder_tmp_%d", CGM.getGlobalUniqueCount());
- C = new llvm::GlobalVariable(C->getType(), true,
+ C = new llvm::GlobalVariable(CGM.getModule().getContext(),
+ C->getType(), true,
llvm::GlobalValue::InternalLinkage,
C, Name, &CGM.getModule());
QualType BPT = BE->getType();
@@ -513,7 +514,8 @@ BlockModule::GetAddrOfGlobalBlock(const BlockExpr *BE, const char * n) {
llvm::ConstantStruct::get(&DescriptorFields[0], 2);
llvm::GlobalVariable *Descriptor =
- new llvm::GlobalVariable(DescriptorStruct->getType(), true,
+ new llvm::GlobalVariable(getModule().getContext(),
+ DescriptorStruct->getType(), true,
llvm::GlobalVariable::InternalLinkage,
DescriptorStruct, "__block_descriptor_global",
&getModule());
@@ -555,7 +557,8 @@ BlockModule::GetAddrOfGlobalBlock(const BlockExpr *BE, const char * n) {
llvm::ConstantStruct::get(&LiteralFields[0], 5);
llvm::GlobalVariable *BlockLiteral =
- new llvm::GlobalVariable(BlockLiteralStruct->getType(), true,
+ new llvm::GlobalVariable(getModule().getContext(),
+ BlockLiteralStruct->getType(), true,
llvm::GlobalVariable::InternalLinkage,
BlockLiteralStruct, "__block_literal_global",
&getModule());
OpenPOWER on IntegriCloud