diff options
author | Fangrui Song <i@maskray.me> | 2023-07-22 00:00:57 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2023-07-22 00:00:57 -0700 |
commit | c51c607dfc6388050ed1381a32089cd08a36ff9a (patch) | |
tree | c0c66fec71679d6da141187d1d1f11f93df32acb /llvm/lib/Support/VirtualFileSystem.cpp | |
parent | 0318123f67d1edb0fb6c05e5b508c8798146b10f (diff) | |
download | llvm-c51c607dfc6388050ed1381a32089cd08a36ff9a.zip llvm-c51c607dfc6388050ed1381a32089cd08a36ff9a.tar.gz llvm-c51c607dfc6388050ed1381a32089cd08a36ff9a.tar.bz2 |
[VirtualFileSystem] Use std::map::emplace
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
-rw-r--r-- | llvm/lib/Support/VirtualFileSystem.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp index 25d057b..d381d79 100644 --- a/llvm/lib/Support/VirtualFileSystem.cpp +++ b/llvm/lib/Support/VirtualFileSystem.cpp @@ -749,8 +749,7 @@ public: } InMemoryNode *addChild(StringRef Name, std::unique_ptr<InMemoryNode> Child) { - return Entries.insert(make_pair(Name.str(), std::move(Child))) - .first->second.get(); + return Entries.emplace(Name, std::move(Child)).first->second.get(); } using const_iterator = decltype(Entries)::const_iterator; |