From eab3d367538030e2fd4feb0c94795e1bdb566451 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Thu, 21 Jul 2016 13:37:48 +0000 Subject: 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 --- llvm/unittests/ADT/StringMapTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/unittests/ADT/StringMapTest.cpp') diff --git a/llvm/unittests/ADT/StringMapTest.cpp b/llvm/unittests/ADT/StringMapTest.cpp index 6ca701bb23a..911c72d7496 100644 --- a/llvm/unittests/ADT/StringMapTest.cpp +++ b/llvm/unittests/ADT/StringMapTest.cpp @@ -458,7 +458,7 @@ struct NonMoveableNonCopyableType { // Test that we can "emplace" an element in the map without involving map/move TEST(StringMapCustomTest, EmplaceTest) { StringMap Map; - Map.emplace_second("abcd", 42); + Map.try_emplace("abcd", 42); EXPECT_EQ(1u, Map.count("abcd")); EXPECT_EQ(42, Map["abcd"].Data); } -- cgit v1.2.3