From 6f81b510217bd87f265cca054c5d9885250d8525 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 28 Nov 2006 22:46:12 +0000 Subject: Removed some of the iostream #includes. Moved towards converting to using llvm streams git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31983 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/Trace.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/Analysis/Trace.cpp') diff --git a/lib/Analysis/Trace.cpp b/lib/Analysis/Trace.cpp index 9fc7b8a2c6..91c7ffa779 100644 --- a/lib/Analysis/Trace.cpp +++ b/lib/Analysis/Trace.cpp @@ -18,8 +18,7 @@ #include "llvm/Analysis/Trace.h" #include "llvm/Function.h" #include "llvm/Assembly/Writer.h" -#include - +#include "llvm/Support/Streams.h" using namespace llvm; Function *Trace::getFunction() const { @@ -33,12 +32,13 @@ Module *Trace::getModule() const { /// print - Write trace to output stream. /// -void Trace::print (std::ostream &O) const { +void Trace::print(llvm_ostream &O) const { Function *F = getFunction (); - O << "; Trace from function " << F->getName () << ", blocks:\n"; - for (const_iterator i = begin (), e = end (); i != e; ++i) { + O << "; Trace from function " << F->getName() << ", blocks:\n"; + for (const_iterator i = begin(), e = end(); i != e; ++i) { O << "; "; - WriteAsOperand (O, *i, true, true, getModule ()); + if (O.stream()) + WriteAsOperand(*O.stream(), *i, true, true, getModule()); O << "\n"; } O << "; Trace parent function: \n" << *F; @@ -47,6 +47,6 @@ void Trace::print (std::ostream &O) const { /// dump - Debugger convenience method; writes trace to standard error /// output stream. /// -void Trace::dump () const { - print (std::cerr); +void Trace::dump() const { + print(llvm_cerr); } -- cgit v1.2.3