llvm-6502/lib/CodeGen/AsmPrinter
David Blaikie e5830c4e26 DebugInfo: Avoid redundantly adding child DIEs to parents.
DIE::addChild had a shortcircuit that silently no-op'd when a child was
readded to the same parent. This hid some quirky/redundant code in
DwarfDebug/CompileUnit. By removing that functionality and replacing it
with an assert I was able to find and cleanup those cases, mostly
centering around adding members to types in various circumstances.

1) The original oddity I noticed while working on type units (which
actually was helping me in the short term, by accident) was the
addToContextOwner call in constructTypeDIE. This call was completely
bogus (why was it only done for non-virtual types? what relevance does
that have at all) and redundant with the more uniform addToContextOwner
made in getOrCreateTypeDIE.

2) If a member function definition was visited (createSubprogramDIE), it
would attempt to build the member function declaration. The declaration
DIE would then be added to its context, but in building the context (the
type for which this function is a member) the members of the type would
be added to the type automatically, so by the time the context was
constructed, the member function was already associated with it.

3) The same as (2) but without the member function being constructed
first. Whenever a type was constructed, the members would be created and
member functions would be created by getOrCreateSubprogramDIE - this
would lead to the subprogram being added to the (incomplete) type
already, then the general member-construction code would add it again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191928 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 20:07:20 +00:00
..
ARMException.cpp Make helpers static. Add missing include so LLVMInitializeObjCARCOpts gets C linkage. 2013-02-15 12:30:38 +00:00
AsmPrinter.cpp Rename DataLayout variables TD -> DL 2013-10-03 19:50:01 +00:00
AsmPrinterDwarf.cpp [Sparc] Implements exception handling in SPARC with DwarfCFI. 2013-09-26 15:11:00 +00:00
AsmPrinterInlineAsm.cpp Add an instruction deprecation feature to TableGen. 2013-09-12 10:28:05 +00:00
CMakeLists.txt Update the CMake build files. 2013-08-08 23:51:31 +00:00
DIE.cpp Debug Info: remove duplication of DIEs when a DIE is part of the type system 2013-10-01 19:52:23 +00:00
DIE.h DebugInfo: Avoid redundantly adding child DIEs to parents. 2013-10-03 20:07:20 +00:00
DIEHash.cpp Add a hashing routine that handles hashing types. Add a test for 2013-09-03 21:57:57 +00:00
DIEHash.h Revert "Give internal classes hidden visibility." 2013-09-11 18:05:11 +00:00
DwarfAccelTable.cpp Move accelerator table defines and constants to Dwarf.h since 2013-09-05 18:20:16 +00:00
DwarfAccelTable.h Revert "Give internal classes hidden visibility." 2013-09-11 18:05:11 +00:00
DwarfCFIException.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
DwarfCompileUnit.cpp DebugInfo: Avoid redundantly adding child DIEs to parents. 2013-10-03 20:07:20 +00:00
DwarfCompileUnit.h Move emission of the debug string table to early in the debug 2013-09-20 23:22:52 +00:00
DwarfDebug.cpp DebugInfo: Avoid redundantly adding child DIEs to parents. 2013-10-03 20:07:20 +00:00
DwarfDebug.h Remove wild .debug_aranges entries generated from unimportant labels 2013-10-03 08:54:43 +00:00
DwarfException.cpp Remove unneeded "TargetMachine.h" #includes. 2013-02-09 20:54:05 +00:00
DwarfException.h Revert "Give internal classes hidden visibility." 2013-09-11 18:05:11 +00:00
ErlangGCPrinter.cpp Add a GC plugin for Erlang 2013-03-25 13:47:46 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
Makefile
OcamlGCPrinter.cpp Last in the series of removing unnecessary '0' arguments for 2013-01-09 03:52:05 +00:00
Win64Exception.cpp Revert: Emit personality function and Dwarf EH data for Win64 SEH. 2013-07-08 04:43:23 +00:00