Move << method out of line.
authorChris Lattner <sabre@nondot.org>
Fri, 7 Jul 2006 18:11:32 +0000 (18:11 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 7 Jul 2006 18:11:32 +0000 (18:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29062 91177308-0d34-0410-b5e6-96231b3b80d8

lib/System/Path.cpp

index 9ee0a3e852785261a93bd63b40f86ac2f6e2a90d..efadfa9adf2208f75bcc866036c7f64eba91e4b9 100644 (file)
@@ -14,8 +14,8 @@
 #include "llvm/System/Path.h"
 #include "llvm/Config/config.h"
 #include <cassert>
-
-namespace llvm {
+#include <ostream>
+using namespace llvm;
 using namespace sys;
 
 //===----------------------------------------------------------------------===//
@@ -23,6 +23,11 @@ using namespace sys;
 //===          independent code.
 //===----------------------------------------------------------------------===//
 
+std::ostream& llvm::operator<<(std::ostream &strm, const sys::Path &aPath) {
+  strm << aPath.toString();
+  return strm;
+}
+
 Path
 Path::GetLLVMConfigDir() {
   Path result;
@@ -91,19 +96,14 @@ Path::FindLibrary(std::string& name) {
   return sys::Path();
 }
 
-std::string
-Path::GetDLLSuffix() {
+std::string Path::GetDLLSuffix() {
   return LTDL_SHLIB_EXT;
 }
 
-}
-
 // Include the truly platform-specific parts of this class.
-
 #if defined(LLVM_ON_UNIX)
 #include "Unix/Path.inc"
 #endif
 #if defined(LLVM_ON_WIN32)
 #include "Win32/Path.inc"
 #endif
-