aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-02-13 19:36:03 +0000
committerMike Stump <mrs@apple.com>2009-02-13 19:36:03 +0000
commit324699105567f2948db316c3a3dc4c1d38a3657e (patch)
tree4c2cd7e205b47af061bce25568673a86e9aa72fe /lib/CodeGen/CGBlocks.cpp
parent05db4278ecd193edcff63fb8c54818226fceaad2 (diff)
Move DescriptorUniqueCount into CGM.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64481 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index d6c248dcef..e82569e281 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/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());