Fix the new print functions to call print instead of dump.

llvm-svn: 103261
This commit is contained in:
Dan Gohman 2010-05-07 16:17:22 +00:00
parent 1512bd9998
commit 2ec28eb3fe

View File

@ -501,7 +501,7 @@ void DIType::print(raw_ostream &OS) const {
OS << " [" << dwarf::TagString(Tag) << "] "; OS << " [" << dwarf::TagString(Tag) << "] ";
// TODO : Print context // TODO : Print context
getCompileUnit().dump(); getCompileUnit().print(OS);
OS << " [" OS << " ["
<< getLineNumber() << ", " << getLineNumber() << ", "
<< getSizeInBits() << ", " << getSizeInBits() << ", "
@ -518,11 +518,11 @@ void DIType::print(raw_ostream &OS) const {
OS << " [fwd] "; OS << " [fwd] ";
if (isBasicType()) if (isBasicType())
DIBasicType(DbgNode).dump(); DIBasicType(DbgNode).print(OS);
else if (isDerivedType()) else if (isDerivedType())
DIDerivedType(DbgNode).dump(); DIDerivedType(DbgNode).print(OS);
else if (isCompositeType()) else if (isCompositeType())
DICompositeType(DbgNode).dump(); DICompositeType(DbgNode).print(OS);
else { else {
OS << "Invalid DIType\n"; OS << "Invalid DIType\n";
return; return;
@ -538,7 +538,7 @@ void DIBasicType::print(raw_ostream &OS) const {
/// print - Print derived type. /// print - Print derived type.
void DIDerivedType::print(raw_ostream &OS) const { void DIDerivedType::print(raw_ostream &OS) const {
OS << "\n\t Derived From: "; getTypeDerivedFrom().dump(); OS << "\n\t Derived From: "; getTypeDerivedFrom().print(OS);
} }
/// print - Print composite type. /// print - Print composite type.
@ -557,7 +557,7 @@ void DIGlobal::print(raw_ostream &OS) const {
OS << " [" << dwarf::TagString(Tag) << "] "; OS << " [" << dwarf::TagString(Tag) << "] ";
// TODO : Print context // TODO : Print context
getCompileUnit().dump(); getCompileUnit().print(OS);
OS << " [" << getLineNumber() << "] "; OS << " [" << getLineNumber() << "] ";
if (isLocalToUnit()) if (isLocalToUnit())
@ -567,7 +567,7 @@ void DIGlobal::print(raw_ostream &OS) const {
OS << " [def] "; OS << " [def] ";
if (isGlobalVariable()) if (isGlobalVariable())
DIGlobalVariable(DbgNode).dump(); DIGlobalVariable(DbgNode).print(OS);
OS << "\n"; OS << "\n";
} }
@ -582,7 +582,7 @@ void DISubprogram::print(raw_ostream &OS) const {
OS << " [" << dwarf::TagString(Tag) << "] "; OS << " [" << dwarf::TagString(Tag) << "] ";
// TODO : Print context // TODO : Print context
getCompileUnit().dump(); getCompileUnit().print(OS);
OS << " [" << getLineNumber() << "] "; OS << " [" << getLineNumber() << "] ";
if (isLocalToUnit()) if (isLocalToUnit())
@ -597,7 +597,7 @@ void DISubprogram::print(raw_ostream &OS) const {
/// print - Print global variable. /// print - Print global variable.
void DIGlobalVariable::print(raw_ostream &OS) const { void DIGlobalVariable::print(raw_ostream &OS) const {
OS << " ["; OS << " [";
getGlobal()->dump(); getGlobal()->print(OS);
OS << "] "; OS << "] ";
} }
@ -607,9 +607,9 @@ void DIVariable::print(raw_ostream &OS) const {
if (!Res.empty()) if (!Res.empty())
OS << " [" << Res << "] "; OS << " [" << Res << "] ";
getCompileUnit().dump(); getCompileUnit().print(OS);
OS << " [" << getLineNumber() << "] "; OS << " [" << getLineNumber() << "] ";
getType().dump(); getType().print(OS);
OS << "\n"; OS << "\n";
// FIXME: Dump complex addresses // FIXME: Dump complex addresses