diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-ar/llvm-ar.cpp | 14 | ||||
-rw-r--r-- | tools/llvm-db/Commands.cpp | 8 |
2 files changed, 15 insertions, 7 deletions
diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp index 8bc9e048da..2ec431727a 100644 --- a/tools/llvm-ar/llvm-ar.cpp +++ b/tools/llvm-ar/llvm-ar.cpp @@ -299,8 +299,10 @@ void buildPaths(bool checkExistence = true) { if (checkExistence) { if (!aPath.exists()) throw std::string("File does not exist: ") + Members[i]; - sys::Path::StatusInfo si; - aPath.getStatusInfo(si); + sys::FileStatus si; + std::string Err; + if (aPath.getFileStatus(si, &Err)) + throw Err; if (si.isDir) { std::set<sys::Path> dirpaths = recurseDirectories(aPath); Paths.insert(dirpaths.begin(),dirpaths.end()); @@ -456,7 +458,7 @@ void doExtract() { // If we're supposed to retain the original modification times, etc. do so // now. if (OriginalDates) - I->getPath().setStatusInfoOnDisk(I->getStatusInfo()); + I->getPath().setStatusInfoOnDisk(I->getFileStatus()); } } } @@ -610,8 +612,10 @@ void doReplaceOrInsert() { } if (found != remaining.end()) { - sys::Path::StatusInfo si; - found->getStatusInfo(si); + sys::FileStatus si; + std::string Err; + if (found->getFileStatus(si, &Err)) + throw Err; if (si.isDir) { if (OnlyUpdate) { // Replace the item only if it is newer. diff --git a/tools/llvm-db/Commands.cpp b/tools/llvm-db/Commands.cpp index 1716e1ba49..da07769fbb 100644 --- a/tools/llvm-db/Commands.cpp +++ b/tools/llvm-db/Commands.cpp @@ -49,8 +49,12 @@ void CLIDebugger::startProgramRunning() { eliminateRunInfo(); // If the program has been modified, reload it! - sys::Path Program (Dbg.getProgramPath()); - if (TheProgramInfo->getProgramTimeStamp() != Program.getTimestamp()) { + sys::Path Program(Dbg.getProgramPath()); + sys::FileStatus Status; + std::string Err; + if (Program.getFileStatus(Status, &Err)) + throw Err; + if (TheProgramInfo->getProgramTimeStamp() != Status.getTimestamp()) { std::cout << "'" << Program << "' has changed; re-reading program.\n"; // Unload an existing program. This kills the program if necessary. |