diff options
author | Devang Patel <dpatel@apple.com> | 2009-08-31 22:47:13 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-08-31 22:47:13 +0000 |
commit | 318d70da84dd9c3371774284695e2f96613d68a9 (patch) | |
tree | 0dbe401e9797b8f5e4828be039e4ec2f74684f4d /lib/Analysis | |
parent | a53768e1e514ec9184b3e17c465b19f9334c1e5c (diff) | |
download | external_llvm-318d70da84dd9c3371774284695e2f96613d68a9.zip external_llvm-318d70da84dd9c3371774284695e2f96613d68a9.tar.gz external_llvm-318d70da84dd9c3371774284695e2f96613d68a9.tar.bz2 |
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')
-rw-r--r-- | lib/Analysis/DebugInfo.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index 9273133..0be6fcf 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. |