Skip to content

Commit d140182

Browse files
[Support] Use a hetrogenous lookup with std::map (NFC) (#113075)
1 parent 2077fb8 commit d140182

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Support/VirtualFileSystem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ class InMemoryFileAdaptor : public File {
750750

751751
class InMemoryDirectory : public InMemoryNode {
752752
Status Stat;
753-
std::map<std::string, std::unique_ptr<InMemoryNode>> Entries;
753+
std::map<std::string, std::unique_ptr<InMemoryNode>, std::less<>> Entries;
754754

755755
public:
756756
InMemoryDirectory(Status Stat)
@@ -766,7 +766,7 @@ class InMemoryDirectory : public InMemoryNode {
766766
UniqueID getUniqueID() const { return Stat.getUniqueID(); }
767767

768768
InMemoryNode *getChild(StringRef Name) const {
769-
auto I = Entries.find(Name.str());
769+
auto I = Entries.find(Name);
770770
if (I != Entries.end())
771771
return I->second.get();
772772
return nullptr;

0 commit comments

Comments
 (0)