aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-07 18:53:16 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-07 18:53:16 +0000
commitc74b4615071151b20fb1f82b11f85c2a1ba53e75 (patch)
treef81aa2aac2c66a8eea00ff3a4b1027891af7a072 /tools
parent2ae9d11b7c0fd54e0b5298fb4fcf17b6ee9d5c91 (diff)
For PR1291:
Change uses of sys::Path class to sys::PathWithStatus in those places where the file status information is needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35743 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-ar/llvm-ar.cpp9
-rw-r--r--tools/llvm-db/Commands.cpp3
-rw-r--r--tools/llvmc/CompilerDriver.cpp3
3 files changed, 10 insertions, 5 deletions
diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp
index 649eb7a7be..fc40f78862 100644
--- a/tools/llvm-ar/llvm-ar.cpp
+++ b/tools/llvm-ar/llvm-ar.cpp
@@ -281,7 +281,8 @@ recurseDirectories(const sys::Path& path,
for (std::set<sys::Path>::iterator I = content.begin(), E = content.end();
I != E; ++I) {
// Make sure it exists and is a directory
- const sys::FileStatus *Status = I->getFileStatus(false, ErrMsg);
+ const sys::FileStatus *Status =
+ sys::PathWithStatus(*I).getFileStatus(false, ErrMsg);
if (!Status)
return true;
if (Status->isDir) {
@@ -309,7 +310,8 @@ bool buildPaths(bool checkExistence, std::string* ErrMsg) {
if (!aPath.exists())
throw std::string("File does not exist: ") + Members[i];
std::string Err;
- const sys::FileStatus *si = aPath.getFileStatus(false, &Err);
+ const sys::FileStatus *si =
+ sys::PathWithStatus(aPath).getFileStatus(false, &Err);
if (!si)
throw Err;
if (si->isDir) {
@@ -645,7 +647,8 @@ doReplaceOrInsert(std::string* ErrMsg) {
if (found != remaining.end()) {
std::string Err;
- const sys::FileStatus *si = found->getFileStatus(false, &Err);
+ const sys::FileStatus *si =
+ sys::PathWithStatus(*found).getFileStatus(false, &Err);
if (!si)
return true;
if (si->isDir) {
diff --git a/tools/llvm-db/Commands.cpp b/tools/llvm-db/Commands.cpp
index 5a8aa2f132..487d5ec536 100644
--- a/tools/llvm-db/Commands.cpp
+++ b/tools/llvm-db/Commands.cpp
@@ -51,7 +51,8 @@ void CLIDebugger::startProgramRunning() {
// If the program has been modified, reload it!
sys::Path Program(Dbg.getProgramPath());
std::string Err;
- const sys::FileStatus *Status = Program.getFileStatus(false, &Err);
+ const sys::FileStatus *Status =
+ sys::PathWithStatus(Program).getFileStatus(false, &Err);
if (!Status)
throw Err;
if (TheProgramInfo->getProgramTimeStamp() != Status->getTimestamp()) {
diff --git a/tools/llvmc/CompilerDriver.cpp b/tools/llvmc/CompilerDriver.cpp
index 3d91ad9676..4092eda610 100644
--- a/tools/llvmc/CompilerDriver.cpp
+++ b/tools/llvmc/CompilerDriver.cpp
@@ -195,7 +195,8 @@ private:
void cleanup() {
if (!isSet(KEEP_TEMPS_FLAG)) {
- const sys::FileStatus *Status = TempDir.getFileStatus();
+ const sys::FileStatus *Status =
+ sys::PathWithStatus(TempDir).getFileStatus();
if (Status && Status->isDir)
TempDir.eraseFromDisk(/*remove_contents=*/true);
} else {