[llvm-commits] CVS: llvm/lib/Analysis/Trace.cpp
Bill Wendling
isanbard at gmail.com
Sat Dec 16 21:15:53 PST 2006
Changes in directory llvm/lib/Analysis:
Trace.cpp updated: 1.5 -> 1.6
---
Log message:
Added an automatic cast to "std::ostream*" etc. from OStream. We then can
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.
---
Diffs of the changes: (+2 -3)
Trace.cpp | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
Index: llvm/lib/Analysis/Trace.cpp
diff -u llvm/lib/Analysis/Trace.cpp:1.5 llvm/lib/Analysis/Trace.cpp:1.6
--- llvm/lib/Analysis/Trace.cpp:1.5 Wed Dec 6 19:30:31 2006
+++ llvm/lib/Analysis/Trace.cpp Sat Dec 16 23:15:12 2006
@@ -31,13 +31,12 @@
/// print - Write trace to output stream.
///
-void Trace::print(OStream &O) const {
+void Trace::print(std::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 << "; ";
- if (O.stream())
- WriteAsOperand(*O.stream(), *i, true, getModule());
+ WriteAsOperand(O, *i, true, getModule());
O << "\n";
}
O << "; Trace parent function: \n" << *F;
More information about the llvm-commits
mailing list