Converted to using llvm streams instead of <iostream>s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31992 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp
index c1279d0..549abf0 100644
--- a/lib/CodeGen/DwarfWriter.cpp
+++ b/lib/CodeGen/DwarfWriter.cpp
@@ -32,7 +32,7 @@
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetFrameInfo.h"
-#include <iostream>
+#include <ostream>
#include <string>
using namespace llvm;
@@ -139,6 +139,9 @@
}
#ifndef NDEBUG
+ void print(llvm_ostream &O) const {
+ if (O.stream()) print(*O.stream());
+ }
void print(std::ostream &O) const {
O << ".debug_" << Tag;
if (Number) O << Number;
@@ -244,6 +247,9 @@
void Emit(const Dwarf &DW) const;
#ifndef NDEBUG
+ void print(llvm_ostream &O) {
+ if (O.stream()) print(*O.stream());
+ }
void print(std::ostream &O);
void dump();
#endif
@@ -331,6 +337,9 @@
void Profile(FoldingSetNodeID &ID) ;
#ifndef NDEBUG
+ void print(llvm_ostream &O, unsigned IncIndent = 0) {
+ if (O.stream()) print(*O.stream(), IncIndent);
+ }
void print(std::ostream &O, unsigned IncIndent = 0);
void dump();
#endif
@@ -379,6 +388,9 @@
virtual void Profile(FoldingSetNodeID &ID) = 0;
#ifndef NDEBUG
+ void print(llvm_ostream &O) {
+ if (O.stream()) print(*O.stream());
+ }
virtual void print(std::ostream &O) = 0;
void dump();
#endif
@@ -2839,14 +2851,14 @@
<< "\n";
}
}
-void DIEAbbrev::dump() { print(std::cerr); }
+void DIEAbbrev::dump() { print(llvm_cerr); }
#endif
//===----------------------------------------------------------------------===//
#ifndef NDEBUG
void DIEValue::dump() {
- print(std::cerr);
+ print(llvm_cerr);
}
#endif
@@ -3055,7 +3067,7 @@
}
void DIE::dump() {
- print(std::cerr);
+ print(llvm_cerr);
}
#endif