aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/System/Path.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/System/Path.h')
-rw-r--r--include/llvm/System/Path.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/llvm/System/Path.h b/include/llvm/System/Path.h
index 7862e21998..10c8bccef8 100644
--- a/include/llvm/System/Path.h
+++ b/include/llvm/System/Path.h
@@ -18,6 +18,7 @@
#include <set>
#include <string>
#include <vector>
+#include <ostream>
namespace llvm {
namespace sys {
@@ -161,7 +162,7 @@ namespace sys {
/// @throws std::string if the path string is not legal.
/// @param unverified_path The path to verify and assign.
/// @brief Construct a Path from a string.
- explicit Path(std::string unverified_path);
+ explicit Path(const std::string& unverified_path);
/// @}
/// @name Operators
@@ -547,6 +548,11 @@ namespace sys {
LLVMFileType IdentifyFileType(const char*magic, unsigned length);
}
+inline std::ostream& operator<<(std::ostream& strm, const sys::Path& aPath) {
+ strm << aPath.toString();
+ return strm;
+}
+
}
// vim: sw=2