Move more to raw_ostream, provide support for writing MachineBasicBlock,
LiveInterval, etc to raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76965 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/VirtRegMap.h b/lib/CodeGen/VirtRegMap.h
index fe767b7..7d1cf95 100644
--- a/lib/CodeGen/VirtRegMap.h
+++ b/lib/CodeGen/VirtRegMap.h
@@ -34,6 +34,7 @@
class MachineRegisterInfo;
class TargetInstrInfo;
class TargetRegisterInfo;
+ class raw_ostream;
class VirtRegMap : public MachineFunctionPass {
public:
@@ -483,6 +484,8 @@
void print(std::ostream &OS, const Module* M = 0) const;
void print(std::ostream *OS) const { if (OS) print(*OS); }
+ void print(raw_ostream &OS, const Module* M = 0) const;
+ void print(raw_ostream *OS) const { if (OS) print(*OS); }
void dump() const;
};
@@ -494,6 +497,14 @@
VRM.print(OS);
return OS;
}
+ inline raw_ostream *operator<<(raw_ostream *OS, const VirtRegMap &VRM) {
+ VRM.print(OS);
+ return OS;
+ }
+ inline raw_ostream &operator<<(raw_ostream &OS, const VirtRegMap &VRM) {
+ VRM.print(OS);
+ return OS;
+ }
} // End llvm namespace
#endif