Emit method definition DIE at module level (even for methods with inlined functino body at soure level) so that the debugger can invoke it. This fixes many test failures in gdb test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90375 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 679d9b9..002e777 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -157,6 +157,10 @@
/// AbstractSubprogramDIEs - Collection of abstruct subprogram DIEs.
SmallPtrSet<DIE *, 4> AbstractSubprogramDIEs;
+ /// TopLevelDIEs - Collection of top level DIEs.
+ SmallPtrSet<DIE *, 4> TopLevelDIEs;
+ SmallVector<DIE *, 4> TopLevelDIEsVector;
+
/// ScopedGVs - Tracks global variables that are not at file scope.
/// For example void f() { static int b = 42; }
SmallVector<WeakVH, 4> ScopedGVs;
@@ -342,10 +346,17 @@
DIE *createMemberDIE(CompileUnit *DW_Unit, const DIDerivedType &DT);
/// createSubprogramDIE - Create new DIE using SP.
- DIE *createSubprogramDIE(CompileUnit *DW_Unit,
- const DISubprogram &SP,
- bool IsConstructor = false,
- bool IsInlined = false);
+ DIE *createSubprogramDIE(CompileUnit *DW_Unit, const DISubprogram &SP);
+
+ /// createMemberSubprogramDIE - Create new member DIE using SP. This
+ /// routine always returns a die with DW_AT_declaration attribute.
+
+ DIE *createMemberSubprogramDIE(CompileUnit *DW_Unit, const DISubprogram &SP);
+
+ /// createRawSubprogramDIE - Create new partially incomplete DIE. This is
+ /// a helper routine used by createMemberSubprogramDIE and
+ /// createSubprogramDIE.
+ DIE *createRawSubprogramDIE(CompileUnit *DW_Unit, const DISubprogram &SP);
/// findCompileUnit - Get the compile unit for the given descriptor.
///