summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-01-14 19:41:09 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-01-14 19:41:09 +0000
commit49e022df8f7906aed5bb0bd3fbe8b8f374642198 (patch)
treece2140e61e58f86e21fded76b14b6f08b0d4a79d
parente14fb33a05fcb3123fab1dda3ae2808b154fe25c (diff)
downloadbcm5719-llvm-49e022df8f7906aed5bb0bd3fbe8b8f374642198.tar.gz
bcm5719-llvm-49e022df8f7906aed5bb0bd3fbe8b8f374642198.zip
[ADT/StringMap] Add a constructor in StringMap that accepts both an
initial size and an allocator. llvm-svn: 172455
-rw-r--r--llvm/include/llvm/ADT/StringMap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/include/llvm/ADT/StringMap.h b/llvm/include/llvm/ADT/StringMap.h
index 0d68d11a12f..978ec443032 100644
--- a/llvm/include/llvm/ADT/StringMap.h
+++ b/llvm/include/llvm/ADT/StringMap.h
@@ -237,6 +237,9 @@ public:
explicit StringMap(AllocatorTy A)
: StringMapImpl(static_cast<unsigned>(sizeof(MapEntryTy))), Allocator(A) {}
+ StringMap(unsigned InitialSize, AllocatorTy A)
+ : StringMapImpl(InitialSize), Allocator(A) {}
+
StringMap(const StringMap &RHS)
: StringMapImpl(static_cast<unsigned>(sizeof(MapEntryTy))) {
assert(RHS.empty() &&
OpenPOWER on IntegriCloud