Fix windows build for r363357

MSVC has trouble referencing the protected Compare class from from the
friend Entry operator<. Just delete that operator, as it's used only
once.

llvm-svn: 363653
This commit is contained in:
Pavel Labath 2019-06-18 07:02:53 +00:00
parent 69daf4a72d
commit afb17daedf
1 changed files with 1 additions and 5 deletions

View File

@ -28,10 +28,6 @@ public:
struct Entry { struct Entry {
Entry(ConstString cstr, const T &v) : cstring(cstr), value(v) {} Entry(ConstString cstr, const T &v) : cstring(cstr), value(v) {}
friend bool operator<(const Entry &lhs, const Entry &rhs) {
return Compare()(lhs, rhs);
}
ConstString cstring; ConstString cstring;
T value; T value;
}; };
@ -165,7 +161,7 @@ public:
// my_map.Append (UniqueCStringMap::Entry(GetName(...), GetValue(...))); // my_map.Append (UniqueCStringMap::Entry(GetName(...), GetValue(...)));
// } // }
// my_map.Sort(); // my_map.Sort();
void Sort() { llvm::sort(m_map.begin(), m_map.end()); } void Sort() { llvm::sort(m_map.begin(), m_map.end(), Compare()); }
// Since we are using a vector to contain our items it will always double its // Since we are using a vector to contain our items it will always double its
// memory consumption as things are added to the vector, so if you intend to // memory consumption as things are added to the vector, so if you intend to