From cbe7a8508affa6e0ff4b3639142f7f063a40691d Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Fri, 7 May 2010 23:19:07 +0000 Subject: Remove DIGlobal. llvm-svn: 103325 --- llvm/lib/Analysis/DebugInfo.cpp | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'llvm/lib/Analysis') diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp index 7bbae59b87a..717c7fb5143 100644 --- a/llvm/lib/Analysis/DebugInfo.cpp +++ b/llvm/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'; -- cgit v1.2.3