mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-12 15:30:56 +00:00
Allocator: Remove ReferenceAdder hack.
This was a workaround for compilers that had issues with reference collapsing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206612 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f34a512a68
commit
d781e40b6a
@ -167,10 +167,8 @@ public:
|
||||
|
||||
|
||||
/// Access to the allocator.
|
||||
typedef typename ReferenceAdder<AllocatorTy>::result AllocatorRefTy;
|
||||
typedef typename ReferenceAdder<const AllocatorTy>::result AllocatorCRefTy;
|
||||
AllocatorRefTy getAllocator() { return Allocator; }
|
||||
AllocatorCRefTy getAllocator() const { return Allocator; }
|
||||
AllocatorTy &getAllocator() { return Allocator; }
|
||||
const AllocatorTy &getAllocator() const { return Allocator; }
|
||||
|
||||
bool count(const K &Key) const {
|
||||
return TopLevelMap.count(Key);
|
||||
|
@ -246,10 +246,8 @@ public:
|
||||
clear();
|
||||
}
|
||||
|
||||
typedef typename ReferenceAdder<AllocatorTy>::result AllocatorRefTy;
|
||||
typedef typename ReferenceAdder<const AllocatorTy>::result AllocatorCRefTy;
|
||||
AllocatorRefTy getAllocator() { return Allocator; }
|
||||
AllocatorCRefTy getAllocator() const { return Allocator; }
|
||||
AllocatorTy &getAllocator() { return Allocator; }
|
||||
const AllocatorTy &getAllocator() const { return Allocator; }
|
||||
|
||||
typedef const char* key_type;
|
||||
typedef ValueTy mapped_type;
|
||||
|
@ -32,12 +32,6 @@
|
||||
#include <cstdlib>
|
||||
|
||||
namespace llvm {
|
||||
template <typename T> struct ReferenceAdder {
|
||||
typedef T &result;
|
||||
};
|
||||
template <typename T> struct ReferenceAdder<T &> {
|
||||
typedef T result;
|
||||
};
|
||||
|
||||
/// \brief CRTP base class providing obvious overloads for the core \c
|
||||
/// Allocate() methods of LLVM-style allocators.
|
||||
|
Loading…
x
Reference in New Issue
Block a user