aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/System
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-29 06:16:32 +0000
committerChris Lattner <sabre@nondot.org>2007-04-29 06:16:32 +0000
commita527bf13a5d85b0a7d70e958a6b1948c02280c7b (patch)
treeadcd304ac49fdeae1eb2ae6e4d766eecfb6b53a7 /include/llvm/System
parent63db485b79620ce7ce04718ffc6b08577d2d918a (diff)
downloadexternal_llvm-a527bf13a5d85b0a7d70e958a6b1948c02280c7b.zip
external_llvm-a527bf13a5d85b0a7d70e958a6b1948c02280c7b.tar.gz
external_llvm-a527bf13a5d85b0a7d70e958a6b1948c02280c7b.tar.bz2
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
Diffstat (limited to 'include/llvm/System')
-rw-r--r--include/llvm/System/Path.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/System/Path.h b/include/llvm/System/Path.h
index 84d9912..573edda 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
/// @{