new method for creating a path, which does not create a temporary string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36552 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-04-29 06:16:32 +00:00
parent 63db485b79
commit a527bf13a5

View File

@ -174,6 +174,14 @@ namespace sys {
/// @brief Construct a Path from a string.
explicit Path(const std::string& p) : path(p) {}
/// 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
/// validity of the path, use the isValid method.
/// @param p The path to assign.
/// @brief Construct a Path from a string.
explicit Path(const char *StrStart, unsigned StrLen)
: path(StrStart, StrStart+StrLen) {}
/// @}
/// @name Operators
/// @{