diff options
author | Dan Gohman <gohman@apple.com> | 2009-09-23 01:33:16 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-09-23 01:33:16 +0000 |
commit | cd26ec5f3c089b3b24f80ff200e94e681eb9e1ee (patch) | |
tree | 62e9a6dbafa4d84a1045809ed86ea3c1396ccb69 /include/llvm/CodeGen/PseudoSourceValue.h | |
parent | 00133a7d52f32ab9c9ac53e964a5cc68fc626b4d (diff) | |
download | external_llvm-cd26ec5f3c089b3b24f80ff200e94e681eb9e1ee.zip external_llvm-cd26ec5f3c089b3b24f80ff200e94e681eb9e1ee.tar.gz external_llvm-cd26ec5f3c089b3b24f80ff200e94e681eb9e1ee.tar.bz2 |
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
Diffstat (limited to 'include/llvm/CodeGen/PseudoSourceValue.h')
-rw-r--r-- | include/llvm/CodeGen/PseudoSourceValue.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/include/llvm/CodeGen/PseudoSourceValue.h b/include/llvm/CodeGen/PseudoSourceValue.h index 3ad2502..49eb5a3 100644 --- a/include/llvm/CodeGen/PseudoSourceValue.h +++ b/include/llvm/CodeGen/PseudoSourceValue.h @@ -25,17 +25,15 @@ namespace llvm { /// stack frame (e.g., a spill slot), below the stack frame (e.g., argument /// space), or constant pool. class PseudoSourceValue : public Value { + private: + /// printCustom - Implement printing for PseudoSourceValue. This is called + /// from Value::print or Value's operator<<. + /// + virtual void printCustom(raw_ostream &O) const; + public: PseudoSourceValue(); - /// dump - Support for debugging, callable in GDB: V->dump() - // - virtual void dump() const; - - /// print - Implement operator<< on PseudoSourceValue. - /// - virtual void print(raw_ostream &OS) const; - /// isConstant - Test whether this PseudoSourceValue has a constant value. /// virtual bool isConstant(const MachineFrameInfo *) const; |