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
diff --git a/lib/Analysis/Trace.cpp b/lib/Analysis/Trace.cpp
index 9fc7b8a..91c7ffa 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 @@
 
 /// 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 @@
 /// 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);
 }