diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-01-10 02:34:23 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-01-10 02:34:23 +0000 |
commit | 58df2e00b244b172ee6902d301607b94783579cf (patch) | |
tree | d2c572d69668db747b45c0a3c652f369fea397f6 /llvm/tools/llvm-ranlib/llvm-ranlib.cpp | |
parent | f6efe58d4585e7fd0b20bac44c3bc027502da121 (diff) | |
download | bcm5719-llvm-58df2e00b244b172ee6902d301607b94783579cf.tar.gz bcm5719-llvm-58df2e00b244b172ee6902d301607b94783579cf.zip |
Support/Path: Deprecate PathV1::exists and replace all uses with PathV2::fs::exists.
llvm-svn: 123151
Diffstat (limited to 'llvm/tools/llvm-ranlib/llvm-ranlib.cpp')
-rw-r--r-- | llvm/tools/llvm-ranlib/llvm-ranlib.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/tools/llvm-ranlib/llvm-ranlib.cpp b/llvm/tools/llvm-ranlib/llvm-ranlib.cpp index 7f94c2413db..64f795f7f63 100644 --- a/llvm/tools/llvm-ranlib/llvm-ranlib.cpp +++ b/llvm/tools/llvm-ranlib/llvm-ranlib.cpp @@ -15,6 +15,7 @@ #include "llvm/Module.h" #include "llvm/Bitcode/Archive.h" #include "llvm/Support/CommandLine.h" +#include "llvm/Support/FileSystem.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/Format.h" @@ -69,7 +70,8 @@ int main(int argc, char **argv) { throw std::string("Archive name invalid: ") + ArchiveName; // Make sure it exists, we don't create empty archives - if (!ArchivePath.exists()) + bool Exists; + if (llvm::sys::fs::exists(ArchivePath.str(), Exists) || !Exists) throw std::string("Archive file does not exist"); std::string err_msg; |