diff options
-rw-r--r-- | lib/CodeGen/CGBlocks.cpp | 5 | ||||
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 1 | ||||
-rw-r--r-- | lib/CodeGen/CodeGenModule.h | 2 |
3 files changed, 2 insertions, 6 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index 8c7e82e61c..cb9de169d7 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -65,11 +65,9 @@ llvm::Constant *CodeGenFunction::BuildDescriptorBlockDecl() { C = llvm::ConstantStruct::get(Elts); - char Name[32]; - sprintf(Name, "__block_descriptor_tmp_%d", CGM.getDescriptorUniqueCount()); C = new llvm::GlobalVariable(C->getType(), true, llvm::GlobalValue::InternalLinkage, - C, Name, &CGM.getModule()); + C, "__block_descriptor_tmp", &CGM.getModule()); return C; } @@ -126,6 +124,7 @@ llvm::Constant *CodeGenFunction::BuildBlockLiteralTmp() { if (BlockHasCopyDispose) flags |= BLOCK_HAS_COPY_DISPOSE; + // __isa C = CGM.getNSConcreteStackBlock(); if (!insideFunction || (!BlockRefDeclList && !BlockByrefDeclList)) { diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 2dbee58a82..091158daba 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -52,7 +52,6 @@ CodeGenModule::CodeGenModule(ASTContext &C, const LangOptions &LO, DebugInfo = GenerateDebugInfo ? new CGDebugInfo(this) : 0; Block.GlobalUniqueCount = 0; - Block.DescriptorUniqueCount = 0; } CodeGenModule::~CodeGenModule() { diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 020f74cddd..bd5a20c68c 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -131,7 +131,6 @@ class CodeGenModule { const llvm::Type *GenericBlockLiteralType; struct { int GlobalUniqueCount; - int DescriptorUniqueCount; } Block; std::vector<llvm::Function *> BuiltinFunctions; @@ -148,7 +147,6 @@ public: llvm::Constant *getNSConcreteGlobalBlock(); llvm::Constant *getNSConcreteStackBlock(); int getGlobalUniqueCount() { return ++Block.GlobalUniqueCount; } - int getDescriptorUniqueCount() { return ++Block.DescriptorUniqueCount; } const llvm::Type *getBlockDescriptorType(); const llvm::Type *getGenericBlockLiteralType(); |