[llvm] r183074 - DenseMap: Move the key into place when we use the move version of operator[].
Benjamin Kramer
benny.kra at googlemail.com
Sat Jun 1 09:37:56 PDT 2013
Author: d0k
Date: Sat Jun 1 11:37:55 2013
New Revision: 183074
URL: http://llvm.org/viewvc/llvm-project?rev=183074&view=rev
Log:
DenseMap: Move the key into place when we use the move version of operator[].
Modified:
llvm/trunk/include/llvm/ADT/DenseMap.h
Modified: llvm/trunk/include/llvm/ADT/DenseMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseMap.h?rev=183074&r1=183073&r2=183074&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/DenseMap.h (original)
+++ llvm/trunk/include/llvm/ADT/DenseMap.h Sat Jun 1 11:37:55 2013
@@ -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
More information about the llvm-commits
mailing list