mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 03:24:09 +00:00
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
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user