Update some globals to use ManagedStatic.
[oota-llvm.git] / lib / CodeGen / SlotIndexes.cpp
index bf66367865d2c10d8d48ff89c9f87227bdf421f2..d99d120509ddde3c2da688b06a857adae4f58180 100644 (file)
 
 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");