summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index d6c248dcef7..e82569e281c 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -65,10 +65,8 @@ llvm::Constant *CodeGenFunction::BuildDescriptorBlockDecl() {
C = llvm::ConstantStruct::get(Elts);
- // FIXME: Should be in module?
- static int desc_unique_count;
char Name[32];
- sprintf(Name, "__block_descriptor_tmp_%d", ++desc_unique_count);
+ sprintf(Name, "__block_descriptor_tmp_%d", CGM.getDescriptorUniqueCount());
C = new llvm::GlobalVariable(C->getType(), true,
llvm::GlobalValue::InternalLinkage,
C, Name, &CGM.getModule());
OpenPOWER on IntegriCloud