summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-07-21 13:37:48 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-07-21 13:37:48 +0000
commiteab3d367538030e2fd4feb0c94795e1bdb566451 (patch)
tree1d60467595a41758a71cfbedd2689c9fcb900efa /llvm/lib/IR
parent6eae9f2c670d8124faafa28b65eb1c95c554b64b (diff)
downloadbcm5719-llvm-eab3d367538030e2fd4feb0c94795e1bdb566451.tar.gz
bcm5719-llvm-eab3d367538030e2fd4feb0c94795e1bdb566451.zip
Rename StringMap::emplace_second to try_emplace.
Coincidentally this function maps to the C++17 try_emplace. Rename it for consistentcy with C++17 std::map. NFC. llvm-svn: 276276
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/Metadata.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp
index 5201c2ecce6..8b8e4dcfc06 100644
--- a/llvm/lib/IR/Metadata.cpp
+++ b/llvm/lib/IR/Metadata.cpp
@@ -416,7 +416,7 @@ void ValueAsMetadata::handleRAUW(Value *From, Value *To) {
MDString *MDString::get(LLVMContext &Context, StringRef Str) {
auto &Store = Context.pImpl->MDStringCache;
- auto I = Store.emplace_second(Str);
+ auto I = Store.try_emplace(Str);
auto &MapEntry = I.first->getValue();
if (!I.second)
return &MapEntry;
OpenPOWER on IntegriCloud