summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-01-02 23:28:39 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-01-02 23:28:39 +0000
commita11df460ace96f61b3f0d7320d7681e37d407d5a (patch)
treea12871845a3e5e0153a14ed3f0750b65e6edbc13 /include
parentfb57392a8d9a2a69732d71185c7b763add493278 (diff)
downloadllvm-a11df460ace96f61b3f0d7320d7681e37d407d5a.tar.gz
llvm-a11df460ace96f61b3f0d7320d7681e37d407d5a.tar.bz2
llvm-a11df460ace96f61b3f0d7320d7681e37d407d5a.tar.xz
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
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/StringMap.h18
1 files changed, 1 insertions, 17 deletions
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<typename ValueTy>
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<typename ValueTy>
-class StringMapEntryInitializer {
-public:
- template <typename InitTy>
- static void Initialize(StringMapEntry<ValueTy> &T, InitTy InitVal) {
- T.second = InitVal;
- }
-};
-
-
/// StringMapEntryBase - Shared base class of StringMapEntry instances.
class StringMapEntryBase {
unsigned StrLen;
@@ -161,15 +148,12 @@ public:
static_cast<StringMapEntry*>(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<char*>(NewItem->getKeyData());
memcpy(StrBuffer, KeyStart, KeyLength);
StrBuffer[KeyLength] = 0; // Null terminate for convenience of clients.
-
- // Initialize the value if the client wants to.
- StringMapEntryInitializer<ValueTy>::Initialize(*NewItem, InitVal);
return NewItem;
}