diff options
Diffstat (limited to 'lib/Analysis/Trace.cpp')
-rw-r--r-- | lib/Analysis/Trace.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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 <iostream> - +#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); } |