diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2007-04-07 18:53:16 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2007-04-07 18:53:16 +0000 |
| commit | 21b76a9b9915202c9c4084072357b7ed32e60f9d (patch) | |
| tree | 59b639d250e081baf03dca1815d0168713f26ada /llvm/tools/llvm-ar | |
| parent | ceeb918dd105248af4b7c3ba4ffcd4b582ea4daf (diff) | |
| download | bcm5719-llvm-21b76a9b9915202c9c4084072357b7ed32e60f9d.tar.gz bcm5719-llvm-21b76a9b9915202c9c4084072357b7ed32e60f9d.zip | |
For PR1291:
Change uses of sys::Path class to sys::PathWithStatus in those places where
the file status information is needed.
llvm-svn: 35743
Diffstat (limited to 'llvm/tools/llvm-ar')
| -rw-r--r-- | llvm/tools/llvm-ar/llvm-ar.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp index 649eb7a7be7..fc40f788620 100644 --- a/llvm/tools/llvm-ar/llvm-ar.cpp +++ b/llvm/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) { |

