aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-08-23 22:53:13 +0000
committerChris Lattner <sabre@nondot.org>2008-08-23 22:53:13 +0000
commit62ca32540f950d500227f1863b95cd08ad28099e (patch)
treef204ed5bd4b0be238323ee6946ad05ef6cb46ebf /lib/CodeGen/MachineFunction.cpp
parentab49ee752ec37f586e45c999eca1e29e32697cb7 (diff)
get MachineConstantPool off std::ostream, onto raw_ostream. It would be
really nice if someone converted MachineFunction::print to raw_ostream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55268 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineFunction.cpp')
-rw-r--r--lib/CodeGen/MachineFunction.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp
index bc5d59e8be..ae97d890db 100644
--- a/lib/CodeGen/MachineFunction.cpp
+++ b/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(); }