mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Add path separator support, patch by Sam Bishop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47662 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -63,6 +63,8 @@ inline bool lastIsSlash(const std::string& path) {
|
||||
namespace llvm {
|
||||
using namespace sys;
|
||||
|
||||
extern const char sys::PathSeparator = ':';
|
||||
|
||||
bool
|
||||
Path::isValid() const {
|
||||
// Check some obvious things
|
||||
@@ -183,25 +185,6 @@ Path::GetTemporaryDirectory(std::string* ErrMsg ) {
|
||||
#endif
|
||||
}
|
||||
|
||||
static void getPathList(const char*path, std::vector<sys::Path>& Paths) {
|
||||
const char* at = path;
|
||||
const char* delim = strchr(at, ':');
|
||||
Path tmpPath;
|
||||
while( delim != 0 ) {
|
||||
std::string tmp(at, size_t(delim-at));
|
||||
if (tmpPath.set(tmp))
|
||||
if (tmpPath.canRead())
|
||||
Paths.push_back(tmpPath);
|
||||
at = delim + 1;
|
||||
delim = strchr(at, ':');
|
||||
}
|
||||
if (*at != 0)
|
||||
if (tmpPath.set(std::string(at)))
|
||||
if (tmpPath.canRead())
|
||||
Paths.push_back(tmpPath);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
Path::GetSystemLibraryPaths(std::vector<sys::Path>& Paths) {
|
||||
#ifdef LTDL_SHLIBPATH_VAR
|
||||
|
||||
Reference in New Issue
Block a user