@@ -312,11 +312,11 @@ std::function<bool(llvm::StringRef)> headerFilter() {
312
312
313
313
// Maps absolute path of each files of each compilation commands to the
314
314
// absolute path of the input file.
315
- llvm::Expected<std::map<std::string, std::string>>
315
+ llvm::Expected<std::map<std::string, std::string, std::less<> >>
316
316
mapInputsToAbsPaths (clang::tooling::CompilationDatabase &CDB,
317
317
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS,
318
318
const std::vector<std::string> &Inputs) {
319
- std::map<std::string, std::string> CDBToAbsPaths;
319
+ std::map<std::string, std::string, std::less<> > CDBToAbsPaths;
320
320
// Factory.editedFiles()` will contain the final code, along with the
321
321
// path given in the compilation database. That path can be
322
322
// absolute or relative, and if it is relative, it is relative to the
@@ -395,8 +395,7 @@ int main(int argc, const char **argv) {
395
395
if (Edit) {
396
396
for (const auto &NameAndContent : Factory.editedFiles ()) {
397
397
llvm::StringRef FileName = NameAndContent.first ();
398
- if (auto It = CDBToAbsPaths->find (FileName.str ());
399
- It != CDBToAbsPaths->end ())
398
+ if (auto It = CDBToAbsPaths->find (FileName); It != CDBToAbsPaths->end ())
400
399
FileName = It->second ;
401
400
402
401
const std::string &FinalCode = NameAndContent.second ;
0 commit comments