[clang-tools-extra] r184956 - Don't use PathV1.h in PerfSupport.cpp.
Rafael Espindola
rafael.espindola at gmail.com
Wed Jun 26 08:22:42 PDT 2013
Author: rafael
Date: Wed Jun 26 10:22:42 2013
New Revision: 184956
URL: http://llvm.org/viewvc/llvm-project?rev=184956&view=rev
Log:
Don't use PathV1.h in PerfSupport.cpp.
Modified:
clang-tools-extra/trunk/cpp11-migrate/Core/PerfSupport.cpp
Modified: clang-tools-extra/trunk/cpp11-migrate/Core/PerfSupport.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/cpp11-migrate/Core/PerfSupport.cpp?rev=184956&r1=184955&r2=184956&view=diff
==============================================================================
--- clang-tools-extra/trunk/cpp11-migrate/Core/PerfSupport.cpp (original)
+++ clang-tools-extra/trunk/cpp11-migrate/Core/PerfSupport.cpp Wed Jun 26 10:22:42 2013
@@ -13,11 +13,11 @@
//===----------------------------------------------------------------------===//
#include "PerfSupport.h"
+#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Path.h"
-#include "llvm/Support/PathV1.h"
void collectSourcePerfData(const Transform &T, SourcePerfData &Data) {
for (Transform::TimingVec::const_iterator I = T.timing_begin(),
@@ -34,8 +34,7 @@ void writePerfDataJSON(
const llvm::StringRef DirectoryName,
const SourcePerfData &TimingResults) {
// Create directory path if it doesn't exist
- llvm::sys::Path P(DirectoryName);
- P.createDirectoryOnDisk(true);
+ llvm::sys::fs::create_directories(DirectoryName);
// Get PID and current time.
// FIXME: id_type on Windows is NOT a process id despite the function name.
@@ -48,7 +47,7 @@ void writePerfDataJSON(
std::string FileName;
llvm::raw_string_ostream SS(FileName);
- SS << P.str() << "/" << static_cast<int>(T.getWallTime()) << "_" << Pid
+ SS << DirectoryName << "/" << static_cast<int>(T.getWallTime()) << "_" << Pid
<< ".json";
std::string ErrorInfo;
More information about the cfe-commits
mailing list