mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-30 19:55:11 +00:00
give StringMap a new ctor which allows you to initialize it
with an existing allocator. The interesting use case of this is that it allows "StringMap<whatever, BumpPtrAllocator&>" for when you want to allocate out of a preexisting bump pointer allocator owned by someone else. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109213 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d69121b3c5
commit
a23650bc01
@ -254,6 +254,10 @@ public:
|
||||
StringMap() : StringMapImpl(static_cast<unsigned>(sizeof(MapEntryTy))) {}
|
||||
explicit StringMap(unsigned InitialSize)
|
||||
: StringMapImpl(InitialSize, static_cast<unsigned>(sizeof(MapEntryTy))) {}
|
||||
|
||||
explicit StringMap(AllocatorTy A)
|
||||
: StringMapImpl(static_cast<unsigned>(sizeof(MapEntryTy))), Allocator(A) {}
|
||||
|
||||
explicit StringMap(const StringMap &RHS)
|
||||
: StringMapImpl(static_cast<unsigned>(sizeof(MapEntryTy))) {
|
||||
assert(RHS.empty() &&
|
||||
|
Loading…
Reference in New Issue
Block a user