Give MachineMemOperand an operator<<, factoring out code from

two different places for printing MachineMemOperands.

Drop the virtual from Value::dump and instead give Value a
protected virtual hook that can be overridden by subclasses
to implement custom printing. This lets printing be more
consistent, and simplifies printing of PseudoSourceValue
values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82599 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2009-09-23 01:33:16 +00:00
parent 00133a7d52
commit cd26ec5f3c
7 changed files with 74 additions and 47 deletions

View File

@ -22,6 +22,7 @@ namespace llvm {
class Value;
class FoldingSetNodeID;
class raw_ostream;
//===----------------------------------------------------------------------===//
/// MachineMemOperand - A description of a memory reference used in the backend.
@ -92,6 +93,8 @@ public:
void Profile(FoldingSetNodeID &ID) const;
};
raw_ostream &operator<<(raw_ostream &OS, const MachineMemOperand &MRO);
} // End llvm namespace
#endif