Remove DIGlobal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103325 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 7bbae59..717c7fb 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -527,31 +527,6 @@
OS << " [" << A.getNumElements() << " elements]";
}
-/// print - Print global.
-void DIGlobal::print(raw_ostream &OS) const {
- StringRef Res = getName();
- if (!Res.empty())
- OS << " [" << Res << "] ";
-
- unsigned Tag = getTag();
- OS << " [" << dwarf::TagString(Tag) << "] ";
-
- // TODO : Print context
- getCompileUnit().print(OS);
- OS << " [" << getLineNumber() << "] ";
-
- if (isLocalToUnit())
- OS << " [local] ";
-
- if (isDefinition())
- OS << " [def] ";
-
- if (isGlobalVariable())
- DIGlobalVariable(DbgNode).print(OS);
-
- OS << "\n";
-}
-
/// print - Print subprogram.
void DISubprogram::print(raw_ostream &OS) const {
StringRef Res = getName();
@@ -577,8 +552,26 @@
/// print - Print global variable.
void DIGlobalVariable::print(raw_ostream &OS) const {
OS << " [";
- getGlobal()->print(OS);
- OS << "] ";
+ StringRef Res = getName();
+ if (!Res.empty())
+ OS << " [" << Res << "] ";
+
+ unsigned Tag = getTag();
+ OS << " [" << dwarf::TagString(Tag) << "] ";
+
+ // TODO : Print context
+ getCompileUnit().print(OS);
+ OS << " [" << getLineNumber() << "] ";
+
+ if (isLocalToUnit())
+ OS << " [local] ";
+
+ if (isDefinition())
+ OS << " [def] ";
+
+ if (isGlobalVariable())
+ DIGlobalVariable(DbgNode).print(OS);
+ OS << "]\n";
}
/// print - Print variable.
@@ -625,11 +618,6 @@
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';