diff options
author | Chris Lattner <sabre@nondot.org> | 2008-08-23 22:53:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-08-23 22:53:13 +0000 |
commit | 838aff36dde592a725ebf4a4c94d9d7b0fecbf7c (patch) | |
tree | 6a9642c6c8d76978d9630870204c694613343c1f /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 82ff92309185d3f33d4531e2c7b67ff2a5c81403 (diff) | |
download | bcm5719-llvm-838aff36dde592a725ebf4a4c94d9d7b0fecbf7c.tar.gz bcm5719-llvm-838aff36dde592a725ebf4a4c94d9d7b0fecbf7c.zip |
get MachineConstantPool off std::ostream, onto raw_ostream. It would be
really nice if someone converted MachineFunction::print to raw_ostream.
llvm-svn: 55268
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index bc5d59e8be8..ae97d890db5 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -248,7 +248,10 @@ void MachineFunction::print(std::ostream &OS) const { JumpTableInfo->print(OS); // Print Constant Pool - ConstantPool->print(OS); + { + raw_os_ostream OSS(OS); + ConstantPool->print(OSS); + } const TargetRegisterInfo *TRI = getTarget().getRegisterInfo(); @@ -526,12 +529,7 @@ unsigned MachineConstantPool::getConstantPoolIndex(MachineConstantPoolValue *V, return Constants.size()-1; } -void MachineConstantPoolValue::print(std::ostream &o) const { - raw_os_ostream OS(o); - print(OS); -} - -void MachineConstantPool::print(std::ostream &OS) const { +void MachineConstantPool::print(raw_ostream &OS) const { for (unsigned i = 0, e = Constants.size(); i != e; ++i) { OS << " <cp #" << i << "> is"; if (Constants[i].isMachineConstantPoolEntry()) @@ -543,4 +541,4 @@ void MachineConstantPool::print(std::ostream &OS) const { } } -void MachineConstantPool::dump() const { print(*cerr.stream()); } +void MachineConstantPool::dump() const { print(errs()); errs().flush(); } |