mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-14 17:34:41 +00:00
fix this to work with allocators that have reference type with compilers
that diagnose invalid references to references. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113078 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ab2cee6d51
commit
061d21eaf8
@ -242,6 +242,9 @@ public:
|
||||
};
|
||||
|
||||
|
||||
template <typename T> struct ReferenceAdder { typedef T& result; };
|
||||
template <typename T> struct ReferenceAdder<T&> { typedef T result; };
|
||||
|
||||
/// StringMap - This is an unconventional map that is specialized for handling
|
||||
/// keys that are "strings", which are basically ranges of bytes. This does some
|
||||
/// funky memory allocation and hashing things to make it extremely efficient,
|
||||
@ -269,9 +272,10 @@ public:
|
||||
clear();
|
||||
}
|
||||
|
||||
|
||||
AllocatorTy &getAllocator() { return Allocator; }
|
||||
const AllocatorTy &getAllocator() const { return Allocator; }
|
||||
typedef typename ReferenceAdder<AllocatorTy>::result AllocatorRefTy;
|
||||
typedef typename ReferenceAdder<const AllocatorTy>::result AllocatorCRefTy;
|
||||
AllocatorRefTy getAllocator() { return Allocator; }
|
||||
AllocatorCRefTy getAllocator() const { return Allocator; }
|
||||
|
||||
typedef const char* key_type;
|
||||
typedef ValueTy mapped_type;
|
||||
|
Loading…
x
Reference in New Issue
Block a user