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 | c0353bfff5a2d37b91af9b40bb6a898e18d03bb8 (patch) | |
tree | f87f618b5debb1c032053808968166debfda50df /llvm/lib/CodeGen/PseudoSourceValue.cpp | |
parent | 1624a4784a2205271ea7c006e7fb4a609853e635 (diff) | |
download | bcm5719-llvm-c0353bfff5a2d37b91af9b40bb6a898e18d03bb8.tar.gz bcm5719-llvm-c0353bfff5a2d37b91af9b40bb6a898e18d03bb8.zip |
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.
llvm-svn: 82599
Diffstat (limited to 'llvm/lib/CodeGen/PseudoSourceValue.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PseudoSourceValue.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/PseudoSourceValue.cpp b/llvm/lib/CodeGen/PseudoSourceValue.cpp index c44093606e3..3728b7fe445 100644 --- a/llvm/lib/CodeGen/PseudoSourceValue.cpp +++ b/llvm/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; } }; |