summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SlotIndexes.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2009-11-07 05:50:28 +0000
committerLang Hames <lhames@gmail.com>2009-11-07 05:50:28 +0000
commitbc247dce4dc9e28695cadfd722a289f5a0a62257 (patch)
treeda39b544644ddf35934eb5a6d776af9fe98249b2 /llvm/lib/CodeGen/SlotIndexes.cpp
parent8ec8804de14b550b4755d5e3aa03b0b2fd2e1710 (diff)
downloadbcm5719-llvm-bc247dce4dc9e28695cadfd722a289f5a0a62257.tar.gz
bcm5719-llvm-bc247dce4dc9e28695cadfd722a289f5a0a62257.zip
Update some globals to use ManagedStatic.
llvm-svn: 86342
Diffstat (limited to 'llvm/lib/CodeGen/SlotIndexes.cpp')
-rw-r--r--llvm/lib/CodeGen/SlotIndexes.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SlotIndexes.cpp b/llvm/lib/CodeGen/SlotIndexes.cpp
index bf66367865d..d99d120509d 100644
--- a/llvm/lib/CodeGen/SlotIndexes.cpp
+++ b/llvm/lib/CodeGen/SlotIndexes.cpp
@@ -16,8 +16,10 @@
using namespace llvm;
-std::auto_ptr<IndexListEntry> IndexListEntry::emptyKeyEntry,
- IndexListEntry::tombstoneKeyEntry;
+
+// Yep - these are thread safe. See the header for details.
+ManagedStatic<EmptyIndexListEntry> IndexListEntry::emptyKeyEntry;
+ManagedStatic<TombstoneIndexListEntry> IndexListEntry::tombstoneKeyEntry;
char SlotIndexes::ID = 0;
static RegisterPass<SlotIndexes> X("slotindexes", "Slot index numbering");
OpenPOWER on IntegriCloud