diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-05-29 21:46:33 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-05-29 21:46:33 +0000 |
commit | eecfa369eb91838fbd833183717b2579a0127acb (patch) | |
tree | 937e4a09cee890082748be314ad3c1aa5dca2c21 /lib | |
parent | ec58498dc911065c122a2a54fa9d1338f7fb187f (diff) |
Remove more iostream header includes. Needed to implement a "FlushStream"
function to flush a specified std::ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51705 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Support/Streams.cpp | 9 | ||||
-rw-r--r-- | lib/System/Unix/Program.inc | 6 | ||||
-rw-r--r-- | lib/Target/CellSPU/SPUISelDAGToDAG.cpp | 1 | ||||
-rw-r--r-- | lib/Target/CellSPU/SPUInstrInfo.cpp | 4 | ||||
-rw-r--r-- | lib/Target/CellSPU/SPURegisterInfo.cpp | 3 |
5 files changed, 15 insertions, 8 deletions
diff --git a/lib/Support/Streams.cpp b/lib/Support/Streams.cpp index 122955ff4e..cf6cfeb7fd 100644 --- a/lib/Support/Streams.cpp +++ b/lib/Support/Streams.cpp @@ -19,3 +19,12 @@ using namespace llvm; OStream llvm::cout(std::cout); OStream llvm::cerr(std::cerr); IStream llvm::cin(std::cin); + +namespace llvm { + +/// FlushStream - Function called by BaseStream to flush an ostream. +void FlushStream(std::ostream &S) { + S << std::flush; +} + +} // end anonymous namespace diff --git a/lib/System/Unix/Program.inc b/lib/System/Unix/Program.inc index d0dade1f8c..182e14db09 100644 --- a/lib/System/Unix/Program.inc +++ b/lib/System/Unix/Program.inc @@ -17,8 +17,8 @@ //===----------------------------------------------------------------------===// #include <llvm/Config/config.h> +#include <llvm/Support/Streams.h> #include "Unix.h" -#include <iostream> #if HAVE_SYS_STAT_H #include <sys/stat.h> #endif @@ -210,8 +210,8 @@ Program::ExecuteAndWait(const Path& path, } // Make sure stderr and stdout have been flushed - std::cerr << std::flush; - std::cout << std::flush; + cerr.flush(); + cout.flush(); fsync(1); fsync(2); diff --git a/lib/Target/CellSPU/SPUISelDAGToDAG.cpp b/lib/Target/CellSPU/SPUISelDAGToDAG.cpp index c6628aca63..b491b13b71 100644 --- a/lib/Target/CellSPU/SPUISelDAGToDAG.cpp +++ b/lib/Target/CellSPU/SPUISelDAGToDAG.cpp @@ -31,7 +31,6 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/Compiler.h" -#include <iostream> #include <queue> #include <set> diff --git a/lib/Target/CellSPU/SPUInstrInfo.cpp b/lib/Target/CellSPU/SPUInstrInfo.cpp index bf94cdc094..3e991a9e79 100644 --- a/lib/Target/CellSPU/SPUInstrInfo.cpp +++ b/lib/Target/CellSPU/SPUInstrInfo.cpp @@ -17,7 +17,7 @@ #include "SPUTargetMachine.h" #include "SPUGenInstrInfo.inc" #include "llvm/CodeGen/MachineInstrBuilder.h" -#include <iostream> +#include "llvm/Support/Streams.h" using namespace llvm; @@ -218,7 +218,7 @@ void SPUInstrInfo::copyRegToReg(MachineBasicBlock &MBB, BuildMI(MBB, MI, get(SPU::ORv4i32), DestReg).addReg(SrcReg) .addReg(SrcReg); } else { - std::cerr << "Attempt to copy unknown/unsupported register class!\n"; + cerr << "Attempt to copy unknown/unsupported register class!\n"; abort(); } } diff --git a/lib/Target/CellSPU/SPURegisterInfo.cpp b/lib/Target/CellSPU/SPURegisterInfo.cpp index ea69d215a5..b6b7fd3174 100644 --- a/lib/Target/CellSPU/SPURegisterInfo.cpp +++ b/lib/Target/CellSPU/SPURegisterInfo.cpp @@ -40,7 +40,6 @@ #include "llvm/ADT/BitVector.h" #include "llvm/ADT/STLExtras.h" #include <cstdlib> -#include <iostream> using namespace llvm; @@ -178,7 +177,7 @@ unsigned SPURegisterInfo::getRegisterNumbering(unsigned RegEnum) { case SPU::R126: return 126; case SPU::R127: return 127; default: - std::cerr << "Unhandled reg in SPURegisterInfo::getRegisterNumbering!\n"; + cerr << "Unhandled reg in SPURegisterInfo::getRegisterNumbering!\n"; abort(); } } |