diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-12 20:23:56 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-12 20:23:56 +0000 |
commit | bf8e8714da8f6434d83cd51dfd6a372bb31db6b9 (patch) | |
tree | 2308df5e2076e54bc4368f71c1267730a2770640 /lib/System/Path.cpp | |
parent | 280d15bd08f05838396f368f0de6ca63ab107f3f (diff) | |
download | external_llvm-bf8e8714da8f6434d83cd51dfd6a372bb31db6b9.zip external_llvm-bf8e8714da8f6434d83cd51dfd6a372bb31db6b9.tar.gz external_llvm-bf8e8714da8f6434d83cd51dfd6a372bb31db6b9.tar.bz2 |
Improve sys::Path::makeAbsolute on Win32.
- Patch by Viktor Kutuzov!
- Minor tweak by me to add llvm_unreachable calls on FIXMEd error paths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75424 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Path.cpp')
-rw-r--r-- | lib/System/Path.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/System/Path.cpp b/lib/System/Path.cpp index 72bd7ad..ce4762e 100644 --- a/lib/System/Path.cpp +++ b/lib/System/Path.cpp @@ -13,6 +13,7 @@ #include "llvm/System/Path.h" #include "llvm/Config/config.h" +#include "llvm/Support/ErrorHandling.h" #include <cassert> #include <cstring> #include <ostream> @@ -207,18 +208,6 @@ bool Path::hasMagicNumber(const std::string &Magic) const { return false; } -void Path::makeAbsolute() { - if (isAbsolute()) - return; - - Path CWD = Path::GetCurrentDirectory(); - assert(CWD.isAbsolute() && "GetCurrentDirectory returned relative path!"); - - CWD.appendComponent(path); - - path = CWD.toString(); -} - static void getPathList(const char*path, std::vector<Path>& Paths) { const char* at = path; const char* delim = strchr(at, PathSeparator); |