From 3735573343614644ead7a8bae674c312db8b1eb1 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Mon, 14 Jan 2013 19:41:09 +0000 Subject: [PATCH] [ADT/StringMap] Add a constructor in StringMap that accepts both an initial size and an allocator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172455 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/StringMap.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/llvm/ADT/StringMap.h b/include/llvm/ADT/StringMap.h index 0d68d11a12f..978ec443032 100644 --- a/include/llvm/ADT/StringMap.h +++ b/include/llvm/ADT/StringMap.h @@ -237,6 +237,9 @@ public: explicit StringMap(AllocatorTy A) : StringMapImpl(static_cast(sizeof(MapEntryTy))), Allocator(A) {} + StringMap(unsigned InitialSize, AllocatorTy A) + : StringMapImpl(InitialSize), Allocator(A) {} + StringMap(const StringMap &RHS) : StringMapImpl(static_cast(sizeof(MapEntryTy))) { assert(RHS.empty() && -- 2.34.1