Replace all uses of PathV1::isDirectory with PathV2::fs::is_directory.

llvm-svn: 123208
This commit is contained in:
Michael J. Spencer 2011-01-11 01:21:20 +00:00
parent 9b6853efd6
commit e503f89b4b
1 changed files with 4 additions and 1 deletions

View File

@ -21,6 +21,7 @@
#include "clang/Rewrite/HTMLRewrite.h" #include "clang/Rewrite/HTMLRewrite.h"
#include "clang/Lex/Lexer.h" #include "clang/Lex/Lexer.h"
#include "clang/Lex/Preprocessor.h" #include "clang/Lex/Preprocessor.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h" #include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Path.h" #include "llvm/Support/Path.h"
@ -121,7 +122,9 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D,
std::string ErrorMsg; std::string ErrorMsg;
Directory.createDirectoryOnDisk(true, &ErrorMsg); Directory.createDirectoryOnDisk(true, &ErrorMsg);
if (!Directory.isDirectory()) { bool IsDirectory;
if (llvm::sys::fs::is_directory(Directory.str(), IsDirectory) ||
!IsDirectory) {
llvm::errs() << "warning: could not create directory '" llvm::errs() << "warning: could not create directory '"
<< Directory.str() << "'\n" << Directory.str() << "'\n"
<< "reason: " << ErrorMsg << '\n'; << "reason: " << ErrorMsg << '\n';