mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-20 09:24:58 +00:00
Make constructors target-specific. This fixes problems where the path would
include backslashes on Windows. This should fix llvm-ld problems on win32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50960 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
64d69102a1
commit
fff116fd58
@ -180,7 +180,7 @@ namespace sys {
|
|||||||
/// of the path, use the isValid method.
|
/// of the path, use the isValid method.
|
||||||
/// @param p The path to assign.
|
/// @param p The path to assign.
|
||||||
/// @brief Construct a Path from a string.
|
/// @brief Construct a Path from a string.
|
||||||
explicit Path(const std::string& p) : path(p) {}
|
explicit Path(const std::string& p);
|
||||||
|
|
||||||
/// This constructor will accept a character range as a path. No checking
|
/// This constructor will accept a character range as a path. No checking
|
||||||
/// is done on this path to determine if it is valid. To determine
|
/// is done on this path to determine if it is valid. To determine
|
||||||
@ -188,8 +188,7 @@ namespace sys {
|
|||||||
/// @param StrStart A pointer to the first character of the path name
|
/// @param StrStart A pointer to the first character of the path name
|
||||||
/// @param StrLen The length of the path name at StrStart
|
/// @param StrLen The length of the path name at StrStart
|
||||||
/// @brief Construct a Path from a string.
|
/// @brief Construct a Path from a string.
|
||||||
explicit Path(const char *StrStart, unsigned StrLen)
|
Path(const char *StrStart, unsigned StrLen);
|
||||||
: path(StrStart, StrStart+StrLen) {}
|
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
/// @name Operators
|
/// @name Operators
|
||||||
|
@ -75,6 +75,12 @@ using namespace sys;
|
|||||||
|
|
||||||
extern const char sys::PathSeparator = ':';
|
extern const char sys::PathSeparator = ':';
|
||||||
|
|
||||||
|
Path::Path(const std::string& p)
|
||||||
|
: path(p) {}
|
||||||
|
|
||||||
|
Path::Path(const char *StrStart, unsigned StrLen)
|
||||||
|
: path(StrStart, StrLen) {}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Path::isValid() const {
|
Path::isValid() const {
|
||||||
// Check some obvious things
|
// Check some obvious things
|
||||||
|
@ -46,6 +46,16 @@ namespace llvm {
|
|||||||
namespace sys {
|
namespace sys {
|
||||||
const char PathSeparator = ';';
|
const char PathSeparator = ';';
|
||||||
|
|
||||||
|
Path::Path(const std::string& p)
|
||||||
|
: path(p) {
|
||||||
|
FlipBackSlashes(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
Path::Path(const char *StrStart, unsigned StrLen)
|
||||||
|
: path(StrStart, StrLen) {
|
||||||
|
FlipBackSlashes(path);
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Path::isValid() const {
|
Path::isValid() const {
|
||||||
if (path.empty())
|
if (path.empty())
|
||||||
@ -230,7 +240,7 @@ Path::isRootDirectory() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string Path::getDirname() const {
|
std::string Path::getDirname() const {
|
||||||
return getDirnameCharSep(path, '\\');
|
return getDirnameCharSep(path, '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
|
Loading…
Reference in New Issue
Block a user