diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-04-29 06:16:32 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-04-29 06:16:32 +0000 |
| commit | 084982501a770407986298ea3887e41384bdbc84 (patch) | |
| tree | 307e91457566dad00cc20894f4f6c2287bf64500 /llvm | |
| parent | cc18989c144e502b9ad7b0d545df4bafd9c544c6 (diff) | |
| download | bcm5719-llvm-084982501a770407986298ea3887e41384bdbc84.tar.gz bcm5719-llvm-084982501a770407986298ea3887e41384bdbc84.zip | |
new method for creating a path, which does not create a temporary string.
llvm-svn: 36552
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/System/Path.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/include/llvm/System/Path.h b/llvm/include/llvm/System/Path.h index 84d99122b1e..573edda15c2 100644 --- a/llvm/include/llvm/System/Path.h +++ b/llvm/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 /// @{ |

