get MachineConstantPool off std::ostream, onto raw_ostream. It would be

really nice if someone converted MachineFunction::print to raw_ostream.

llvm-svn: 55268
This commit is contained in:
Chris Lattner
2008-08-23 22:53:13 +00:00
parent 82ff923091
commit 838aff36dd
3 changed files with 26 additions and 34 deletions

View File

@@ -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(); }