aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/System
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-07-15 16:33:33 +0000
committerDan Gohman <gohman@apple.com>2009-07-15 16:33:33 +0000
commit843796c2bc241b502735a62b8590d07ff74b8415 (patch)
treeeb1f62d2573915d5006f0401a64f21f21958cc28 /include/llvm/System
parentdfd64ca7d0d832485dcae754b5fa50f912aa703c (diff)
downloadexternal_llvm-843796c2bc241b502735a62b8590d07ff74b8415.zip
external_llvm-843796c2bc241b502735a62b8590d07ff74b8415.tar.gz
external_llvm-843796c2bc241b502735a62b8590d07ff74b8415.tar.bz2
Add a raw_ostream operator<< to sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75790 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System')
-rw-r--r--include/llvm/System/Path.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/System/Path.h b/include/llvm/System/Path.h
index 05be221..8b603f5 100644
--- a/include/llvm/System/Path.h
+++ b/include/llvm/System/Path.h
@@ -15,6 +15,7 @@
#define LLVM_SYSTEM_PATH_H
#include "llvm/System/TimeValue.h"
+#include "llvm/Support/raw_ostream.h"
#include <set>
#include <string>
#include <vector>
@@ -714,6 +715,17 @@ namespace sys {
extern const char PathSeparator;
}
+inline raw_ostream& operator<<(raw_ostream& strm, const sys::Path& aPath) {
+ strm << aPath.toString();
+ return strm;
+}
+
+inline raw_ostream& operator<<(raw_ostream& strm,
+ const sys::PathWithStatus& aPath) {
+ strm << static_cast<const sys::Path&>(aPath);
+ return strm;
+}
+
std::ostream& operator<<(std::ostream& strm, const sys::Path& aPath);
inline std::ostream& operator<<(std::ostream& strm,
const sys::PathWithStatus& aPath) {