Tighten up error checking of args.
[oota-llvm.git] / lib / CodeGen / LiveInterval.cpp
index d178a6f444eab42a62ba208fd1b93e2ea0921dc5..0ca16007b2d4b6e20eb188cb8c4d0710c8483272 100644 (file)
@@ -23,8 +23,8 @@
 #include "llvm/Support/Streams.h"
 #include "llvm/Target/MRegisterInfo.h"
 #include <algorithm>
-#include <iostream>
 #include <map>
+#include <ostream>
 using namespace llvm;
 
 // An example for liveAt():
@@ -472,10 +472,10 @@ std::ostream& llvm::operator<<(std::ostream& os, const LiveRange &LR) {
 }
 
 void LiveRange::dump() const {
-  llvm_cerr << *this << "\n";
+  cerr << *this << "\n";
 }
 
-void LiveInterval::print(llvm_ostream OS, const MRegisterInfo *MRI) const {
+void LiveInterval::print(std::ostream &OS, const MRegisterInfo *MRI) const {
   if (MRI && MRegisterInfo::isPhysicalRegister(reg))
     OS << MRI->getName(reg);
   else
@@ -508,5 +508,10 @@ void LiveInterval::print(llvm_ostream OS, const MRegisterInfo *MRI) const {
 }
 
 void LiveInterval::dump() const {
-  llvm_cerr << *this << "\n";
+  cerr << *this << "\n";
+}
+
+
+void LiveRange::print(std::ostream &os) const {
+  os << *this;
 }