From a11df460ace96f61b3f0d7320d7681e37d407d5a Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 2 Jan 2014 23:28:39 +0000 Subject: Remove StringMapEntryInitializer support. It was never specialized so let's just remove that unused configurability and always do the default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198374 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/StringMap.h | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'include/llvm') diff --git a/include/llvm/ADT/StringMap.h b/include/llvm/ADT/StringMap.h index f22ce80df7..4a32b60195 100644 --- a/include/llvm/ADT/StringMap.h +++ b/include/llvm/ADT/StringMap.h @@ -26,19 +26,6 @@ namespace llvm { template class StringMapEntry; -/// StringMapEntryInitializer - This datatype can be partially specialized for -/// various datatypes in a stringmap to allow them to be initialized when an -/// entry is default constructed for the map. -template -class StringMapEntryInitializer { -public: - template - static void Initialize(StringMapEntry &T, InitTy InitVal) { - T.second = InitVal; - } -}; - - /// StringMapEntryBase - Shared base class of StringMapEntry instances. class StringMapEntryBase { unsigned StrLen; @@ -161,15 +148,12 @@ public: static_cast(Allocator.Allocate(AllocSize,Alignment)); // Default construct the value. - new (NewItem) StringMapEntry(KeyLength); + new (NewItem) StringMapEntry(KeyLength, InitVal); // Copy the string information. char *StrBuffer = const_cast(NewItem->getKeyData()); memcpy(StrBuffer, KeyStart, KeyLength); StrBuffer[KeyLength] = 0; // Null terminate for convenience of clients. - - // Initialize the value if the client wants to. - StringMapEntryInitializer::Initialize(*NewItem, InitVal); return NewItem; } -- cgit v1.2.3