aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DebugInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r--lib/Analysis/DebugInfo.cpp28
1 files changed, 8 insertions, 20 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 7bbae59b87..717c7fb514 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -527,8 +527,8 @@ void DICompositeType::print(raw_ostream &OS) const {
OS << " [" << A.getNumElements() << " elements]";
}
-/// print - Print global.
-void DIGlobal::print(raw_ostream &OS) const {
+/// print - Print subprogram.
+void DISubprogram::print(raw_ostream &OS) const {
StringRef Res = getName();
if (!Res.empty())
OS << " [" << Res << "] ";
@@ -546,14 +546,12 @@ void DIGlobal::print(raw_ostream &OS) const {
if (isDefinition())
OS << " [def] ";
- if (isGlobalVariable())
- DIGlobalVariable(DbgNode).print(OS);
-
OS << "\n";
}
-/// print - Print subprogram.
-void DISubprogram::print(raw_ostream &OS) const {
+/// print - Print global variable.
+void DIGlobalVariable::print(raw_ostream &OS) const {
+ OS << " [";
StringRef Res = getName();
if (!Res.empty())
OS << " [" << Res << "] ";
@@ -571,14 +569,9 @@ void DISubprogram::print(raw_ostream &OS) const {
if (isDefinition())
OS << " [def] ";
- OS << "\n";
-}
-
-/// print - Print global variable.
-void DIGlobalVariable::print(raw_ostream &OS) const {
- OS << " [";
- getGlobal()->print(OS);
- OS << "] ";
+ if (isGlobalVariable())
+ DIGlobalVariable(DbgNode).print(OS);
+ OS << "]\n";
}
/// print - Print variable.
@@ -625,11 +618,6 @@ void DICompositeType::dump() const {
print(dbgs()); dbgs() << '\n';
}
-/// dump - Print global to dbgs() with a newline.
-void DIGlobal::dump() const {
- print(dbgs()); dbgs() << '\n';
-}
-
/// dump - Print subprogram to dbgs() with a newline.
void DISubprogram::dump() const {
print(dbgs()); dbgs() << '\n';