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 | b2de5fa6891b3c1f751b26bd8d0bea978a274d54 (patch) | |
| tree | 032ac34291db1ca8e780e3b22fd6693f2f4bcef3 /llvm/lib/Analysis | |
| parent | 759e32bdc69968ec9ada4781b34894bb72fede43 (diff) | |
| download | bcm5719-llvm-b2de5fa6891b3c1f751b26bd8d0bea978a274d54.tar.gz bcm5719-llvm-b2de5fa6891b3c1f751b26bd8d0bea978a274d54.zip | |
Subprogram is a scope. Derive DISubprogram from DIScope.
llvm-svn: 80637
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/DebugInfo.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp index 92731335af9..0be6fcfec52 100644 --- a/llvm/lib/Analysis/DebugInfo.cpp +++ b/llvm/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. |

