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 /lib/CodeGen/PseudoSourceValue.cpp | |
parent | 00133a7d52f32ab9c9ac53e964a5cc68fc626b4d (diff) |
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 'lib/CodeGen/PseudoSourceValue.cpp')
-rw-r--r-- | lib/CodeGen/PseudoSourceValue.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/CodeGen/PseudoSourceValue.cpp b/lib/CodeGen/PseudoSourceValue.cpp index c44093606e..3728b7fe44 100644 --- a/lib/CodeGen/PseudoSourceValue.cpp +++ b/lib/CodeGen/PseudoSourceValue.cpp @@ -47,12 +47,8 @@ PseudoSourceValue::PseudoSourceValue() : Value(PointerType::getUnqual(Type::getInt8Ty(getGlobalContext())), PseudoSourceValueVal) {} -void PseudoSourceValue::dump() const { - print(errs()); errs() << '\n'; -} - -void PseudoSourceValue::print(raw_ostream &OS) const { - OS << PSVNames[this - *PSVs]; +void PseudoSourceValue::printCustom(raw_ostream &O) const { + O << PSVNames[this - *PSVs]; } namespace { @@ -67,7 +63,7 @@ namespace { virtual bool isConstant(const MachineFrameInfo *MFI) const; - virtual void print(raw_ostream &OS) const { + virtual void printCustom(raw_ostream &OS) const { OS << "FixedStack" << FI; } }; |