[cfe-commits] r123208 - /cfe/trunk/lib/StaticAnalyzer/HTMLDiagnostics.cpp
Michael J. Spencer
bigcheesegs at gmail.com
Mon Jan 10 17:21:21 PST 2011
Author: mspencer
Date: Mon Jan 10 19:21:20 2011
New Revision: 123208
URL: http://llvm.org/viewvc/llvm-project?rev=123208&view=rev
Log:
Replace all uses of PathV1::isDirectory with PathV2::fs::is_directory.
Modified:
cfe/trunk/lib/StaticAnalyzer/HTMLDiagnostics.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/HTMLDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/HTMLDiagnostics.cpp?rev=123208&r1=123207&r2=123208&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/HTMLDiagnostics.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/HTMLDiagnostics.cpp Mon Jan 10 19:21:20 2011
@@ -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 @@
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';
More information about the cfe-commits
mailing list