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;
}
if (BlockHasCopyDispose)
flags |= BLOCK_HAS_COPY_DISPOSE;
+ // __isa
C = CGM.getNSConcreteStackBlock();
if (!insideFunction ||
(!BlockRefDeclList && !BlockByrefDeclList)) {
DebugInfo = GenerateDebugInfo ? new CGDebugInfo(this) : 0;
Block.GlobalUniqueCount = 0;
- Block.DescriptorUniqueCount = 0;
}
CodeGenModule::~CodeGenModule() {
const llvm::Type *GenericBlockLiteralType;
struct {
int GlobalUniqueCount;
- int DescriptorUniqueCount;
} Block;
std::vector<llvm::Function *> BuiltinFunctions;
llvm::Constant *getNSConcreteGlobalBlock();
llvm::Constant *getNSConcreteStackBlock();
int getGlobalUniqueCount() { return ++Block.GlobalUniqueCount; }
- int getDescriptorUniqueCount() { return ++Block.DescriptorUniqueCount; }
const llvm::Type *getBlockDescriptorType();
const llvm::Type *getGenericBlockLiteralType();