klimek added inline comments. ================ Comment at: lib/Format/Format.cpp:2103 @@ +2102,3 @@ + if (!FS) { + // If FS is not specified, the default file system is the real file system. + FS = vfs::getRealFileSystem().get(); ---------------- I think this comment is redundant. I'd remove it.
================ Comment at: lib/Format/Format.cpp:2149 @@ -2140,3 +2148,3 @@ // the file or not. - llvm::sys::fs::is_regular_file(Twine(ConfigFile), IsFile); - + auto FileStatus = FS->status(ConfigFile.c_str()); + bool IsFile = FileStatus && (FileStatus->getType() == ---------------- Any reason to not just reassign Status (here and below)? ================ Comment at: lib/Format/Format.cpp:2157 @@ -2147,2 +2156,3 @@ DEBUG(llvm::dbgs() << "Trying " << ConfigFile << "...\n"); - llvm::sys::fs::is_regular_file(Twine(ConfigFile), IsFile); + auto Status = FS->status(Twine(ConfigFile)); + IsFile = Status && ---------------- I'm aware you didn't change this, but is Twine() really necessary? http://reviews.llvm.org/D18399 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits