[wpiutil] Replace LLVM StringMap impl with std::map

As string_view operations on std::map<std::string> won't be integrated
until C++26, placeholder implementations are used which are less efficient
in a couple of situations (e.g. insert with hint).
This commit is contained in:
Peter Johnson
2024-10-23 21:33:12 -07:00
parent 5f3cf517d3
commit f620141e0d
34 changed files with 944 additions and 2031 deletions

View File

@@ -60,7 +60,7 @@ std::string_view MimeTypeFromPath(std::string_view path) {
if (dot_pos > 0 && dot_pos != std::string_view::npos) {
auto type = mimeTypes.find(wpi::substr(path, dot_pos + 1));
if (type != mimeTypes.end()) {
return type->getValue();
return type->second;
}
}
return defaultType;