From a527bf13a5d85b0a7d70e958a6b1948c02280c7b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 29 Apr 2007 06:16:32 +0000 Subject: [PATCH] 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 --- include/llvm/System/Path.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/llvm/System/Path.h b/include/llvm/System/Path.h index 84d99122b1e..573edda15c2 100644 --- a/include/llvm/System/Path.h +++ b/include/llvm/System/Path.h @@ -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 /// @{