From da8b91a0731e34b97aadb0241ba6cefa4481cffa Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 1 Jun 2013 16:37:55 +0000 Subject: 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 --- include/llvm/ADT/DenseMap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') 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 -- cgit v1.1