diff options
author | Bill Wendling <isanbard@gmail.com> | 2006-11-28 22:21:29 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2006-11-28 22:21:29 +0000 |
commit | b5ebf15b2b2ce8989caf1a1114b05d80b0f9bd48 (patch) | |
tree | d3bcb286a90fa4c2b441167133b09cf44c1a7f04 /include/llvm/CodeGen/MachineInstr.h | |
parent | d4d9ab80b7b23c2f73192319e5582fb6802f5f18 (diff) |
Added a temporary hack to get the llvm-streams to work for future checkins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31978 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 1aa8b40e7e..11a769c930 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -18,6 +18,7 @@ #include "llvm/ADT/iterator" #include "llvm/Support/DataTypes.h" +#include "llvm/Support/Streams.h" #include <vector> #include <cassert> #include <iosfwd> @@ -284,6 +285,10 @@ public: IsDead = false; } + friend llvm_ostream& operator<<(llvm_ostream& os, const MachineOperand& mop) { + if (os.stream()) *os.stream() << mop; + return os; + } friend std::ostream& operator<<(std::ostream& os, const MachineOperand& mop); friend class MachineInstr; @@ -400,8 +405,15 @@ public: // // Debugging support // + void print(llvm_ostream &OS, const TargetMachine *TM) const { + if (OS.stream()) print(*OS.stream(), TM); + } void print(std::ostream &OS, const TargetMachine *TM) const; void dump() const; + friend llvm_ostream& operator<<(llvm_ostream& os, const MachineInstr& minstr){ + if (os.stream()) *os.stream() << minstr; + return os; + } friend std::ostream& operator<<(std::ostream& os, const MachineInstr& minstr); //===--------------------------------------------------------------------===// |