DenseMap: Move the key into place when we use the move version of operator[].

llvm-svn: 183074
This commit is contained in:
Benjamin Kramer 2013-06-01 16:37:55 +00:00
parent b565f89929
commit 4fb88349d3
1 changed files with 2 additions and 2 deletions

View File

@ -222,11 +222,11 @@ public:
if (LookupBucketFor(Key, TheBucket)) if (LookupBucketFor(Key, TheBucket))
return *TheBucket; return *TheBucket;
return *InsertIntoBucket(Key, ValueT(), TheBucket); return *InsertIntoBucket(std::move(Key), ValueT(), TheBucket);
} }
ValueT &operator[](KeyT &&Key) { ValueT &operator[](KeyT &&Key) {
return FindAndConstruct(Key).second; return FindAndConstruct(std::move(Key)).second;
} }
#endif #endif