[cfe-commits] r64486 - in /cfe/trunk/lib/CodeGen: CGBlocks.cpp CodeGenModule.cpp CodeGenModule.h
Mike Stump
mrs at apple.com
Fri Feb 13 12:17:16 PST 2009
Author: mrs
Date: Fri Feb 13 14:17:16 2009
New Revision: 64486
URL: http://llvm.org/viewvc/llvm-project?rev=64486&view=rev
Log:
Let the backend unique these.
Modified:
cfe/trunk/lib/CodeGen/CGBlocks.cpp
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
cfe/trunk/lib/CodeGen/CodeGenModule.h
Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.cpp?rev=64486&r1=64485&r2=64486&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.cpp Fri Feb 13 14:17:16 2009
@@ -65,11 +65,9 @@
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 @@
if (BlockHasCopyDispose)
flags |= BLOCK_HAS_COPY_DISPOSE;
+ // __isa
C = CGM.getNSConcreteStackBlock();
if (!insideFunction ||
(!BlockRefDeclList && !BlockByrefDeclList)) {
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=64486&r1=64485&r2=64486&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Fri Feb 13 14:17:16 2009
@@ -52,7 +52,6 @@
DebugInfo = GenerateDebugInfo ? new CGDebugInfo(this) : 0;
Block.GlobalUniqueCount = 0;
- Block.DescriptorUniqueCount = 0;
}
CodeGenModule::~CodeGenModule() {
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.h?rev=64486&r1=64485&r2=64486&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.h Fri Feb 13 14:17:16 2009
@@ -131,7 +131,6 @@
const llvm::Type *GenericBlockLiteralType;
struct {
int GlobalUniqueCount;
- int DescriptorUniqueCount;
} Block;
std::vector<llvm::Function *> BuiltinFunctions;
@@ -148,7 +147,6 @@
llvm::Constant *getNSConcreteGlobalBlock();
llvm::Constant *getNSConcreteStackBlock();
int getGlobalUniqueCount() { return ++Block.GlobalUniqueCount; }
- int getDescriptorUniqueCount() { return ++Block.DescriptorUniqueCount; }
const llvm::Type *getBlockDescriptorType();
const llvm::Type *getGenericBlockLiteralType();
More information about the cfe-commits
mailing list