diff options
author | Kazu Hirata <kazu@google.com> | 2024-10-20 10:42:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-20 10:42:53 -0700 |
commit | d1401822e2d2753bed3ac597a42cc0b261de40a4 (patch) | |
tree | 1ceadf57b15e5b10fd7b9fda587448c8ae5c45c9 /llvm/lib/Support/VirtualFileSystem.cpp | |
parent | 2077fb80ffb58cd1060ec6a5475399c6ad297df3 (diff) | |
download | llvm-d1401822e2d2753bed3ac597a42cc0b261de40a4.zip llvm-d1401822e2d2753bed3ac597a42cc0b261de40a4.tar.gz llvm-d1401822e2d2753bed3ac597a42cc0b261de40a4.tar.bz2 |
[Support] Use a hetrogenous lookup with std::map (NFC) (#113075)
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
-rw-r--r-- | llvm/lib/Support/VirtualFileSystem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp index 928c0b5..3e79ecf 100644 --- a/llvm/lib/Support/VirtualFileSystem.cpp +++ b/llvm/lib/Support/VirtualFileSystem.cpp @@ -750,7 +750,7 @@ public: class InMemoryDirectory : public InMemoryNode { Status Stat; - std::map<std::string, std::unique_ptr<InMemoryNode>> Entries; + std::map<std::string, std::unique_ptr<InMemoryNode>, std::less<>> Entries; public: InMemoryDirectory(Status Stat) @@ -766,7 +766,7 @@ public: UniqueID getUniqueID() const { return Stat.getUniqueID(); } InMemoryNode *getChild(StringRef Name) const { - auto I = Entries.find(Name.str()); + auto I = Entries.find(Name); if (I != Entries.end()) return I->second.get(); return nullptr; |