projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e85192
)
DenseMap: Move the key into place when we use the move version of operator[].
author
Benjamin Kramer
<benny.kra@googlemail.com>
Sat, 1 Jun 2013 16:37:55 +0000
(16:37 +0000)
committer
Benjamin Kramer
<benny.kra@googlemail.com>
Sat, 1 Jun 2013 16:37:55 +0000
(16:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183074
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/DenseMap.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/DenseMap.h
b/include/llvm/ADT/DenseMap.h
index 31fd6d899daec9bc5c3e868e9ae5066750612fef..d5aa8646b31c7628e5ace51b55dce723244e2a23 100644
(file)
--- 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