aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-08-31 22:47:13 +0000
committerDevang Patel <dpatel@apple.com>2009-08-31 22:47:13 +0000
commit82dfc0cd8c3c2bf780a13cc35c1a8df7ad137477 (patch)
tree0dbe401e9797b8f5e4828be039e4ec2f74684f4d /lib/Analysis/DebugInfo.cpp
parent5e005d814f13f1796cf9e32c7525a5241fface1a (diff)
Subprogram is a scope. Derive DISubprogram from DIScope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80637 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r--lib/Analysis/DebugInfo.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 92731335af..0be6fcfec5 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -494,7 +494,24 @@ void DIGlobal::dump() const {
/// dump - Print subprogram.
void DISubprogram::dump() const {
- DIGlobal::dump();
+ std::string Res;
+ if (!getName(Res).empty())
+ errs() << " [" << Res << "] ";
+
+ unsigned Tag = getTag();
+ errs() << " [" << dwarf::TagString(Tag) << "] ";
+
+ // TODO : Print context
+ getCompileUnit().dump();
+ errs() << " [" << getLineNumber() << "] ";
+
+ if (isLocalToUnit())
+ errs() << " [local] ";
+
+ if (isDefinition())
+ errs() << " [def] ";
+
+ errs() << "\n";
}
/// dump - Print global variable.