aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DebugInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-23 07:33:14 +0000
committerChris Lattner <sabre@nondot.org>2009-08-23 07:33:14 +0000
commita81d29b3916c2eb87a17f800f3759ce21a4a96fd (patch)
treee1aa2af31db16cca11d47693aaa452f778f537c7 /lib/Analysis/DebugInfo.cpp
parent2e35bec78a3279ceb330bec3d401ba6e8da8480c (diff)
remove uses of llvm/Support/Streams.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79838 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r--lib/Analysis/DebugInfo.cpp65
1 files changed, 33 insertions, 32 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 03e08862bd..b7c73f8760 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -23,8 +23,7 @@
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Support/Dwarf.h"
#include "llvm/Support/DebugLoc.h"
-#include "llvm/Support/Streams.h"
-
+#include "llvm/Support/raw_ostream.h"
using namespace llvm;
using namespace llvm::dwarf;
@@ -342,17 +341,17 @@ bool DISubprogram::describes(const Function *F) {
/// dump - Print descriptor.
void DIDescriptor::dump() const {
- cerr << "[" << dwarf::TagString(getTag()) << "] ";
- cerr << std::hex << "[GV:" << DbgGV << "]" << std::dec;
+ errs() << "[" << dwarf::TagString(getTag()) << "] [GV:";
+ errs().write_hex((intptr_t)DbgGV) << ']';
}
/// dump - Print compile unit.
void DICompileUnit::dump() const {
if (getLanguage())
- cerr << " [" << dwarf::LanguageString(getLanguage()) << "] ";
+ errs() << " [" << dwarf::LanguageString(getLanguage()) << "] ";
std::string Res1, Res2;
- cerr << " [" << getDirectory(Res1) << "/" << getFilename(Res2) << " ]";
+ errs() << " [" << getDirectory(Res1) << "/" << getFilename(Res2) << " ]";
}
/// dump - Print type.
@@ -361,27 +360,27 @@ void DIType::dump() const {
std::string Res;
if (!getName(Res).empty())
- cerr << " [" << Res << "] ";
+ errs() << " [" << Res << "] ";
unsigned Tag = getTag();
- cerr << " [" << dwarf::TagString(Tag) << "] ";
+ errs() << " [" << dwarf::TagString(Tag) << "] ";
// TODO : Print context
getCompileUnit().dump();
- cerr << " ["
- << getLineNumber() << ", "
- << getSizeInBits() << ", "
- << getAlignInBits() << ", "
- << getOffsetInBits()
- << "] ";
+ errs() << " ["
+ << getLineNumber() << ", "
+ << getSizeInBits() << ", "
+ << getAlignInBits() << ", "
+ << getOffsetInBits()
+ << "] ";
if (isPrivate())
- cerr << " [private] ";
+ errs() << " [private] ";
else if (isProtected())
- cerr << " [protected] ";
+ errs() << " [protected] ";
if (isForwardDecl())
- cerr << " [fwd] ";
+ errs() << " [fwd] ";
if (isBasicType(Tag))
DIBasicType(DbgGV).dump();
@@ -390,21 +389,21 @@ void DIType::dump() const {
else if (isCompositeType(Tag))
DICompositeType(DbgGV).dump();
else {
- cerr << "Invalid DIType\n";
+ errs() << "Invalid DIType\n";
return;
}
- cerr << "\n";
+ errs() << "\n";
}
/// dump - Print basic type.
void DIBasicType::dump() const {
- cerr << " [" << dwarf::AttributeEncodingString(getEncoding()) << "] ";
+ errs() << " [" << dwarf::AttributeEncodingString(getEncoding()) << "] ";
}
/// dump - Print derived type.
void DIDerivedType::dump() const {
- cerr << "\n\t Derived From: "; getTypeDerivedFrom().dump();
+ errs() << "\n\t Derived From: "; getTypeDerivedFrom().dump();
}
/// dump - Print composite type.
@@ -412,32 +411,32 @@ void DICompositeType::dump() const {
DIArray A = getTypeArray();
if (A.isNull())
return;
- cerr << " [" << A.getNumElements() << " elements]";
+ errs() << " [" << A.getNumElements() << " elements]";
}
/// dump - Print global.
void DIGlobal::dump() const {
std::string Res;
if (!getName(Res).empty())
- cerr << " [" << Res << "] ";
+ errs() << " [" << Res << "] ";
unsigned Tag = getTag();
- cerr << " [" << dwarf::TagString(Tag) << "] ";
+ errs() << " [" << dwarf::TagString(Tag) << "] ";
// TODO : Print context
getCompileUnit().dump();
- cerr << " [" << getLineNumber() << "] ";
+ errs() << " [" << getLineNumber() << "] ";
if (isLocalToUnit())
- cerr << " [local] ";
+ errs() << " [local] ";
if (isDefinition())
- cerr << " [def] ";
+ errs() << " [def] ";
if (isGlobalVariable(Tag))
DIGlobalVariable(DbgGV).dump();
- cerr << "\n";
+ errs() << "\n";
}
/// dump - Print subprogram.
@@ -447,19 +446,21 @@ void DISubprogram::dump() const {
/// dump - Print global variable.
void DIGlobalVariable::dump() const {
- cerr << " ["; getGlobal()->dump(); cerr << "] ";
+ errs() << " [";
+ getGlobal()->dump();
+ errs() << "] ";
}
/// dump - Print variable.
void DIVariable::dump() const {
std::string Res;
if (!getName(Res).empty())
- cerr << " [" << Res << "] ";
+ errs() << " [" << Res << "] ";
getCompileUnit().dump();
- cerr << " [" << getLineNumber() << "] ";
+ errs() << " [" << getLineNumber() << "] ";
getType().dump();
- cerr << "\n";
+ errs() << "\n";
}
//===----------------------------------------------------------------------===//