[llvm-commits] CVS: llvm/include/llvm/System/Path.h
Chris Lattner
sabre at nondot.org
Sat Apr 28 23:16:50 PDT 2007
Changes in directory llvm/include/llvm/System:
Path.h updated: 1.52 -> 1.53
---
Log message:
new method for creating a path, which does not create a temporary string.
---
Diffs of the changes: (+8 -0)
Path.h | 8 ++++++++
1 files changed, 8 insertions(+)
Index: llvm/include/llvm/System/Path.h
diff -u llvm/include/llvm/System/Path.h:1.52 llvm/include/llvm/System/Path.h:1.53
--- llvm/include/llvm/System/Path.h:1.52 Tue Apr 10 21:02:09 2007
+++ llvm/include/llvm/System/Path.h Sun Apr 29 01:16:32 2007
@@ -174,6 +174,14 @@
/// @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
/// @{
More information about the llvm-commits
mailing list