summaryrefslogtreecommitdiff
path: root/include/llvm/ADT
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-04-18 14:54:51 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-04-18 14:54:51 +0000
commitd781e40b6a3fe4a0dfcf9b1e4100c8664b2f3918 (patch)
tree518cb1a62c2c68f40929b5c3c2f6326002a32cb3 /include/llvm/ADT
parentf34a512a68aecdc5c6a70dffac64223abfa233fa (diff)
downloadllvm-d781e40b6a3fe4a0dfcf9b1e4100c8664b2f3918.tar.gz
llvm-d781e40b6a3fe4a0dfcf9b1e4100c8664b2f3918.tar.bz2
llvm-d781e40b6a3fe4a0dfcf9b1e4100c8664b2f3918.tar.xz
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
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r--include/llvm/ADT/ScopedHashTable.h6
-rw-r--r--include/llvm/ADT/StringMap.h6
2 files changed, 4 insertions, 8 deletions
diff --git a/include/llvm/ADT/ScopedHashTable.h b/include/llvm/ADT/ScopedHashTable.h
index ae16c9c137..3cc7738df8 100644
--- a/include/llvm/ADT/ScopedHashTable.h
+++ b/include/llvm/ADT/ScopedHashTable.h
@@ -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);
diff --git a/include/llvm/ADT/StringMap.h b/include/llvm/ADT/StringMap.h
index f7f940944c..a966977ea5 100644
--- a/include/llvm/ADT/StringMap.h
+++ b/include/llvm/ADT/StringMap.h
@@ -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;