Bill Wendling | e562ed1 | 2006-11-17 09:51:22 +0000 | [diff] [blame] | 1 | //===-- Streams.cpp - Wrappers for iostreams ------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 4ee451d | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Bill Wendling | e562ed1 | 2006-11-17 09:51:22 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file implements a wrapper for the std::cout and std::cerr I/O streams. |
| 11 | // It prevents the need to include <iostream> to each file just to get I/O. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #include "llvm/Support/Streams.h" |
| 16 | #include <iostream> |
| 17 | using namespace llvm; |
| 18 | |
Bill Wendling | e815619 | 2006-12-07 01:30:32 +0000 | [diff] [blame] | 19 | OStream llvm::cout(std::cout); |
| 20 | OStream llvm::cerr(std::cerr); |
| 21 | IStream llvm::cin(std::cin); |
Bill Wendling | eecfa36 | 2008-05-29 21:46:33 +0000 | [diff] [blame] | 22 | |
| 23 | namespace llvm { |
| 24 | |
| 25 | /// FlushStream - Function called by BaseStream to flush an ostream. |
| 26 | void FlushStream(std::ostream &S) { |
| 27 | S << std::flush; |
| 28 | } |
| 29 | |
| 30 | } // end anonymous namespace |