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 f61e0bcd39c..045f7338e00 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -154,9 +154,7 @@ llvm::Constant *CodeGenFunction::BuildBlockLiteralTmp() {
C = llvm::ConstantStruct::get(Elts);
char Name[32];
- // FIXME: Boost in CGM?
- static int global_unique_count;
- sprintf(Name, "__block_holder_tmp_%d", ++global_unique_count);
+ sprintf(Name, "__block_holder_tmp_%d", CGM.getGlobalUniqueCount());
C = new llvm::GlobalVariable(C->getType(), true,
llvm::GlobalValue::InternalLinkage,
C, Name, &CGM.getModule());
OpenPOWER on IntegriCloud