aboutsummaryrefslogtreecommitdiffstats
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
commit491f783caa6d53724a49d4746428a0313facbb86 (patch)
treef204ed5bd4b0be238323ee6946ad05ef6cb46ebf /lib/CodeGen/MachineFunction.cpp
parent2ff3a89717ffadd4f6de8c9917eae5c433847a8a (diff)
downloadexternal_llvm-491f783caa6d53724a49d4746428a0313facbb86.tar.gz
external_llvm-491f783caa6d53724a49d4746428a0313facbb86.tar.bz2
external_llvm-491f783caa6d53724a49d4746428a0313facbb86.zip
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(); }