Revise debug info machinery to digest nested functions and classes.

A certain GDB testsuite case (local.cc) has a function nested inside a
class nested inside another function.  GCC presents the innermost
function to llvm-convert first.  Heretofore, the debug info mistakenly
placed the inner function at module scope.  This patch walks the GCC
context links and instantiates the outer class and function so the
debug info is properly nested.  Radar 7426545.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100530 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Stuart Hastings
2010-04-06 17:19:32 +00:00
parent f77cdabb58
commit 983327b351
3 changed files with 28 additions and 9 deletions

View File

@@ -332,6 +332,9 @@ private:
/// addToContextOwner - Add Die into the list of its context owner's children.
void addToContextOwner(DIE *Die, DIDescriptor Context);
/// isFunctionContext - True if given Context is nested within a function.
bool isFunctionContext(DIE *context);
/// addType - Add a new type attribute to the specified entity.
void addType(DIE *Entity, DIType Ty);