From: Dan Gohman Date: Wed, 15 Jul 2009 16:33:33 +0000 (+0000) Subject: Add a raw_ostream operator<< to sys::Path. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6ca5f9360ce657c1ab382605536751d33c1d138a;p=oota-llvm.git 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 --- diff --git a/include/llvm/System/Path.h b/include/llvm/System/Path.h index 05be2212758..8b603f5ad42 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 #include #include @@ -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(aPath); + return strm; +} + std::ostream& operator<<(std::ostream& strm, const sys::Path& aPath); inline std::ostream& operator<<(std::ostream& strm, const sys::PathWithStatus& aPath) {