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
This commit is contained in:
Devang Patel
2009-08-31 22:47:13 +00:00
parent 5e005d814f
commit 82dfc0cd8c
4 changed files with 59 additions and 8 deletions

View File

@@ -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.