From 4d484a753f38a231e17c364cba496f8c6d2d771e Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Tue, 11 Jan 2011 01:21:20 +0000 Subject: [PATCH] Replace all uses of PathV1::isDirectory with PathV2::fs::is_directory. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123208 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/StaticAnalyzer/HTMLDiagnostics.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/StaticAnalyzer/HTMLDiagnostics.cpp b/lib/StaticAnalyzer/HTMLDiagnostics.cpp index 659c32d58d..bd20d481a9 100644 --- a/lib/StaticAnalyzer/HTMLDiagnostics.cpp +++ b/lib/StaticAnalyzer/HTMLDiagnostics.cpp @@ -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'; -- 2.40.0