aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-06-01 16:37:55 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-06-01 16:37:55 +0000
commitda8b91a0731e34b97aadb0241ba6cefa4481cffa (patch)
treeca0b9bbc3574889cefc674cbf38aff1e19aa985d /include
parent8e851920c0dc16d10db3c4330152a27787aba785 (diff)
downloadexternal_llvm-da8b91a0731e34b97aadb0241ba6cefa4481cffa.zip
external_llvm-da8b91a0731e34b97aadb0241ba6cefa4481cffa.tar.gz
external_llvm-da8b91a0731e34b97aadb0241ba6cefa4481cffa.tar.bz2
DenseMap: Move the key into place when we use the move version of operator[].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183074 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/DenseMap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h
index 31fd6d8..d5aa864 100644
--- a/include/llvm/ADT/DenseMap.h
+++ b/include/llvm/ADT/DenseMap.h
@@ -222,11 +222,11 @@ public:
if (LookupBucketFor(Key, TheBucket))
return *TheBucket;
- return *InsertIntoBucket(Key, ValueT(), TheBucket);
+ return *InsertIntoBucket(std::move(Key), ValueT(), TheBucket);
}
ValueT &operator[](KeyT &&Key) {
- return FindAndConstruct(Key).second;
+ return FindAndConstruct(std::move(Key)).second;
}
#endif