diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2020-02-08 13:27:52 +0100 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2020-02-08 13:28:29 +0100 |
commit | ef83d46b6b428fa1c8614cd28ab6fe3f07f8d075 (patch) | |
tree | 941a1821c2812d10acd9b121978495bd448c9521 /clang/lib/Frontend/CompilerInstance.cpp | |
parent | ed92ac73aff55211b0b67537fc36e663815cc9f7 (diff) | |
download | llvm-ef83d46b6b428fa1c8614cd28ab6fe3f07f8d075.zip llvm-ef83d46b6b428fa1c8614cd28ab6fe3f07f8d075.tar.gz llvm-ef83d46b6b428fa1c8614cd28ab6fe3f07f8d075.tar.bz2 |
Use heterogenous lookup for std;:map<std::string with a StringRef. NFCI.
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 0db8df0..fe78791 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -1634,15 +1634,15 @@ enum ModuleSource { /// Select a source for loading the named module and compute the filename to /// load it from. -static ModuleSource -selectModuleSource(Module *M, StringRef ModuleName, std::string &ModuleFilename, - const std::map<std::string, std::string> &BuiltModules, - HeaderSearch &HS) { +static ModuleSource selectModuleSource( + Module *M, StringRef ModuleName, std::string &ModuleFilename, + const std::map<std::string, std::string, std::less<>> &BuiltModules, + HeaderSearch &HS) { assert(ModuleFilename.empty() && "Already has a module source?"); // Check to see if the module has been built as part of this compilation // via a module build pragma. - auto BuiltModuleIt = BuiltModules.find(std::string(ModuleName)); + auto BuiltModuleIt = BuiltModules.find(ModuleName); if (BuiltModuleIt != BuiltModules.end()) { ModuleFilename = BuiltModuleIt->second; return MS_ModuleBuildPragma; |