X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FAnalysis%2FTrace.cpp;h=68a39cd581f43c560035ffe977413ebcaad4c2dd;hb=0d18174f0f138e98fcb8348b735a90add45428b8;hp=d0457557c8e9b29cc1c9423f964930adcbfbdc41;hpb=3749c9cae41d2e682f67a41b07e0c50b46dbb000;p=oota-llvm.git diff --git a/lib/Analysis/Trace.cpp b/lib/Analysis/Trace.cpp index d0457557c8e..68a39cd581f 100644 --- a/lib/Analysis/Trace.cpp +++ b/lib/Analysis/Trace.cpp @@ -2,8 +2,8 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // @@ -18,27 +18,26 @@ #include "llvm/Analysis/Trace.h" #include "llvm/Function.h" #include "llvm/Assembly/Writer.h" -#include "llvm/Support/Streams.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/raw_ostream.h" using namespace llvm; Function *Trace::getFunction() const { return getEntryBasicBlock()->getParent(); } - Module *Trace::getModule() const { return getFunction()->getParent(); } /// print - Write trace to output stream. /// -void Trace::print(llvm_ostream &O) const { - Function *F = getFunction (); - O << "; Trace from function " << F->getName() << ", blocks:\n"; +void Trace::print(raw_ostream &O) const { + Function *F = getFunction(); + O << "; Trace from function " << F->getNameStr() << ", blocks:\n"; for (const_iterator i = begin(), e = end(); i != e; ++i) { O << "; "; - if (O.stream()) - WriteAsOperand(*O.stream(), *i, true, getModule()); + WriteAsOperand(O, *i, true, getModule()); O << "\n"; } O << "; Trace parent function: \n" << *F; @@ -48,5 +47,5 @@ void Trace::print(llvm_ostream &O) const { /// output stream. /// void Trace::dump() const { - print(llvm_cerr); + print(dbgs()); }