diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-17 21:22:22 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-17 21:22:22 +0000 |
commit | f28df4cdba9e82c15136ac4f2010ba50e9071141 (patch) | |
tree | 498574ea9b2896f4088b598d4aaf73e101c8824a /clang/lib/Driver/Driver.cpp | |
parent | 559e09e39de1cebf132c4d1d3c10763560e0c2e8 (diff) | |
download | bcm5719-llvm-f28df4cdba9e82c15136ac4f2010ba50e9071141.tar.gz bcm5719-llvm-f28df4cdba9e82c15136ac4f2010ba50e9071141.zip |
Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}.
llvm-svn: 122087
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 621ce8dd580..e021dcd43ae 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -30,6 +30,7 @@ #include "llvm/ADT/OwningPtr.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/Support/Program.h" @@ -757,14 +758,15 @@ void Driver::BuildActions(const ToolChain &TC, const ArgList &Args, // Check that the file exists, if enabled. if (CheckInputsExist && memcmp(Value, "-", 2) != 0) { - llvm::sys::Path Path(Value); + llvm::SmallString<64> Path(Value); if (Arg *WorkDir = Args.getLastArg(options::OPT_working_directory)) - if (!Path.isAbsolute()) { + if (llvm::sys::path::is_absolute(Path.str())) { Path = WorkDir->getValue(Args); - Path.appendComponent(Value); + llvm::sys::path::append(Path, Value); } - if (!Path.exists()) + bool exists = false; + if (/*error_code ec =*/llvm::sys::fs::exists(Value, exists) || !exists) Diag(clang::diag::err_drv_no_such_file) << Path.str(); else Inputs.push_back(std::make_pair(Ty, A)); |