summaryrefslogtreecommitdiff
path: root/lib/Analysis/Trace.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2006-11-28 22:46:12 +0000
committerBill Wendling <isanbard@gmail.com>2006-11-28 22:46:12 +0000
commit6f81b510217bd87f265cca054c5d9885250d8525 (patch)
tree5df9ed1ff445ba9c1efe8754da583542d079d455 /lib/Analysis/Trace.cpp
parentc0ac317f93bef323437d791e4ef5a97f36d50515 (diff)
downloadllvm-6f81b510217bd87f265cca054c5d9885250d8525.tar.gz
llvm-6f81b510217bd87f265cca054c5d9885250d8525.tar.bz2
llvm-6f81b510217bd87f265cca054c5d9885250d8525.tar.xz
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
Diffstat (limited to 'lib/Analysis/Trace.cpp')
-rw-r--r--lib/Analysis/Trace.cpp16
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);
}