]> granicus.if.org Git - clang/commitdiff
Replace all uses of PathV1::isDirectory with PathV2::fs::is_directory.
authorMichael J. Spencer <bigcheesegs@gmail.com>
Tue, 11 Jan 2011 01:21:20 +0000 (01:21 +0000)
committerMichael J. Spencer <bigcheesegs@gmail.com>
Tue, 11 Jan 2011 01:21:20 +0000 (01:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123208 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/HTMLDiagnostics.cpp

index 659c32d58d47fa7b36936df2dab0a0894c8af3e1..bd20d481a99d8a4f8be7b0b4770d76cba69bc4db 100644 (file)
@@ -21,6 +21,7 @@
 #include "clang/Rewrite/HTMLRewrite.h"
 #include "clang/Lex/Lexer.h"
 #include "clang/Lex/Preprocessor.h"
+#include "llvm/Support/FileSystem.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/Path.h"
@@ -121,7 +122,9 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D,
     std::string 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 '"
                    << Directory.str() << "'\n"
                    << "reason: " << ErrorMsg << '\n';