diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-08 19:05:04 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-08 19:05:04 +0000 |
commit | c10c8d3e2ba225e14891b5c93bd79760a575da88 (patch) | |
tree | f1d918d117e789ba331f222cc2928490bfd52f26 /clang/lib/CodeGen/CGBlocks.cpp | |
parent | fa04002254ffd2b1ff480461fc9e06593d7d5a35 (diff) | |
download | bcm5719-llvm-c10c8d3e2ba225e14891b5c93bd79760a575da88.tar.gz bcm5719-llvm-c10c8d3e2ba225e14891b5c93bd79760a575da88.zip |
Update for LLVM API change.
llvm-svn: 75028
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 8de3518406d..42b55f79bff 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -50,9 +50,9 @@ BuildDescriptorBlockDecl(bool BlockHasCopyDispose, uint64_t Size, C = llvm::ConstantStruct::get(Elts); - C = new llvm::GlobalVariable(CGM.getModule().getContext(), C->getType(), true, + C = new llvm::GlobalVariable(CGM.getModule(), C->getType(), true, llvm::GlobalValue::InternalLinkage, - C, "__block_descriptor_tmp", &CGM.getModule()); + C, "__block_descriptor_tmp"); return C; } @@ -165,10 +165,9 @@ llvm::Value *CodeGenFunction::BuildBlockLiteralTmp(const BlockExpr *BE) { char Name[32]; sprintf(Name, "__block_holder_tmp_%d", CGM.getGlobalUniqueCount()); - C = new llvm::GlobalVariable(CGM.getModule().getContext(), - C->getType(), true, + C = new llvm::GlobalVariable(CGM.getModule(), C->getType(), true, llvm::GlobalValue::InternalLinkage, - C, Name, &CGM.getModule()); + C, Name); QualType BPT = BE->getType(); C = llvm::ConstantExpr::getBitCast(C, ConvertType(BPT)); return C; @@ -514,11 +513,9 @@ BlockModule::GetAddrOfGlobalBlock(const BlockExpr *BE, const char * n) { llvm::ConstantStruct::get(&DescriptorFields[0], 2); llvm::GlobalVariable *Descriptor = - new llvm::GlobalVariable(getModule().getContext(), - DescriptorStruct->getType(), true, + new llvm::GlobalVariable(getModule(), DescriptorStruct->getType(), true, llvm::GlobalVariable::InternalLinkage, - DescriptorStruct, "__block_descriptor_global", - &getModule()); + DescriptorStruct, "__block_descriptor_global"); // Generate the constants for the block literal. llvm::Constant *LiteralFields[5]; @@ -557,11 +554,9 @@ BlockModule::GetAddrOfGlobalBlock(const BlockExpr *BE, const char * n) { llvm::ConstantStruct::get(&LiteralFields[0], 5); llvm::GlobalVariable *BlockLiteral = - new llvm::GlobalVariable(getModule().getContext(), - BlockLiteralStruct->getType(), true, + new llvm::GlobalVariable(getModule(), BlockLiteralStruct->getType(), true, llvm::GlobalVariable::InternalLinkage, - BlockLiteralStruct, "__block_literal_global", - &getModule()); + BlockLiteralStruct, "__block_literal_global"); return BlockLiteral; } |