summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
Commit message (Collapse)AuthorAgeFilesLines
...
* DebugInfo: Remove CompileUnit::constructTypeDIEImpl now that it's just a ↵David Blaikie2013-11-261-4/+0
| | | | | | | | | simple wrapper again. r195698 moved the type unit checking up into getOrCreateTypeDIE so remove the redundant check and fold the functions back together again. llvm-svn: 195700
* DebugInfo: Pubtypes: Coelesce pubtype registration with accelerator type ↵David Blaikie2013-11-261-7/+1
| | | | | | | | | | registration. It might be possible to eventually use one data structure, but I haven't looked at the exact criteria used for accelerator tables and pubtypes to see if there's good reason for the differences between the two or not. llvm-svn: 195696
* In Dwarf 3 (and Dwarf 2) attributes whose value are offsets into aEric Christopher2013-11-211-3/+11
| | | | | | | | | | | | | | | | | | | | | section use the form DW_FORM_data4 whilst in Dwarf 4 and later they use the form DW_FORM_sec_offset. This patch updates the places where such attributes are generated to use the appropriate form depending on the Dwarf version. The DIE entries affected have the following tags: DW_AT_stmt_list, DW_AT_ranges, DW_AT_location, DW_AT_GNU_pubnames, DW_AT_GNU_pubtypes, DW_AT_GNU_addr_base, DW_AT_GNU_ranges_base It also adds a hidden command line option "--dwarf-version=<uint>" to llc which allows the version of Dwarf to be generated to override what is specified in the metadata; this makes it possible to update existing tests to check the debugging information generated for both Dwarf 4 (the default) and Dwarf 3 using the same metadata. Patch (slightly modified) by Keith Walker! llvm-svn: 195391
* Move DebugInfoOffset member near the other data member it helps describe.Eric Christopher2013-11-211-3/+3
| | | | llvm-svn: 195299
* Reflow some documentation and remove whitespace comments. MoveEric Christopher2013-11-211-27/+10
| | | | | | DebugInfoOffset data member up with the rest of the data members. llvm-svn: 195298
* Add more documenation for the lookup tables data members.Eric Christopher2013-11-211-0/+3
| | | | llvm-svn: 195297
* Reorder language in the CompileUnit description and add a comment.Eric Christopher2013-11-211-2/+3
| | | | | | Language may only be a temporary addition. llvm-svn: 195296
* Constify the DIEs used for pubname and pubtype tables. PropagateEric Christopher2013-11-211-4/+4
| | | | | | through findAttribute etc. llvm-svn: 195290
* DebugInfo: Partial implementation of DWARF type units.David Blaikie2013-11-191-1/+12
| | | | | | | | | | | | | | Emit DW_TAG_type_units into the debug_info section using compile unit headers. This is bogus/unusable by debuggers, but testable and provides more isolated review. Subsequent patches will include support for type unit headers and emission into the debug_types section, as well as comdat grouping the types based on their hash. Also the CompileUnit type will be renamed 'Unit' and relevant portions pulled out into respective CompileUnit and TypeUnit types. llvm-svn: 195166
* DebugInfo: Constify accelerator table handling, and separate type ↵David Blaikie2013-11-191-12/+16
| | | | | | accelarator insertion in preparation for a second use of this code from type units. llvm-svn: 195164
* Formatting and 80-col.Eric Christopher2013-11-191-9/+14
| | | | llvm-svn: 195122
* DwarfCompileUnit: Add type safety to createGlobalVariableDIEDavid Blaikie2013-11-171-1/+1
| | | | llvm-svn: 194979
* DwarfCompileUnit: Push type safety of DIDescriptor through ↵David Blaikie2013-11-161-1/+1
| | | | | | CompileUnit::createAndAddDIE. llvm-svn: 194902
* DwarfCompileUnit: Add type safety to CompileUnit::getNode by returning ↵David Blaikie2013-11-151-1/+1
| | | | | | DICompileUnit instead of a raw MDNode*. llvm-svn: 194895
* DwarfCompileUnit: Add type safety by using DICompileUnit rather than raw ↵David Blaikie2013-11-151-3/+3
| | | | | | MDNode* for the CU metadata node llvm-svn: 194893
* DwarfCompileUnit: Push DIDescriptors through a getDIE/insertDIEDavid Blaikie2013-11-151-2/+2
| | | | llvm-svn: 194875
* Use a reference rather than a pointer as we don't expect a NULLEric Christopher2013-11-151-1/+1
| | | | | | | | DbgVariable. No functional change. llvm-svn: 194761
* Unify the adding of enumerators with the construction of the enumeration.Eric Christopher2013-11-111-1/+1
| | | | llvm-svn: 194401
* Just pass the DIComposite type by value instead of by pointer.Eric Christopher2013-11-111-1/+1
| | | | llvm-svn: 194398
* Debug Info: remove duplication of DIEs when a DIE can be shared across CUs.Manman Ren2013-10-311-6/+14
| | | | | | | | | | | | | | | | | | | We add a map in DwarfDebug to map MDNodes that are shareable across CUs to the corresponding DIEs: MDTypeNodeToDieMap. These DIEs can be shared across CUs, that is why we keep the maps in DwarfDebug instead of CompileUnit. We make the assumption that if a DIE is not added to an owner yet, we assume it belongs to the current CU. Since DIEs for the type system are added to their owners immediately after creation, and other DIEs belong to the current CU, the assumption should be true. A testing case is added to show that we only create a single DIE for a type MDNode and we use ref_addr to refer to the type DIE. We also add a testing case to show ref_addr relocations for non-darwin platforms. llvm-svn: 193779
* DebugInfo: Push header handling down into CompileUnitDavid Blaikie2013-10-301-0/+11
| | | | | | | This is a preliminary step to handling type units by abstracting over all (type or compile) units. llvm-svn: 193714
* Debug Info: support for DW_FORM_ref_addr.Manman Ren2013-10-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support ref_addr, we calculate the section offset of a DIE (i.e. offset of a DIE from beginning of the debug info section). The Offset field in DIE is currently CU-relative. To calculate the section offset, we add a DebugInfoOffset field in CompileUnit to store the offset of a CU from beginning of the debug info section. We set the value in DwarfUnits::computeSizeAndOffset for each CompileUnit. A helper function DIE::getCompileUnit is added to return the CU DIE that the input DIE belongs to. We also add a map CUDieMap in DwarfDebug to help finding the CU for a given CU DIE. For a cross-referenced DIE, we first find the CU DIE it belongs to with getCompileUnit, then we use CUDieMap to get the corresponding CU for the CU DIE. Adding the section offset of the CU with the CU-relative offset of a DIE gives us the seciton offset of the DIE. We correctly emit ref_addr with relocation using EmitLabelPlusOffset when doesDwarfUseRelocationsAcrossSections is true. This commit handles the emission of DW_FORM_ref_addr when we have an attribute with FORM_ref_addr. A follow-on patch will start using ref_addr when adding a DIEEntry. This commit will be tested and verified in the follow-on patch. Reviewed off-list by Eric, Thanks. llvm-svn: 193658
* Debug Info: instead of calling addToContextOwner which constructs the contextManman Ren2013-10-291-3/+0
| | | | | | | | | | | | | | | after the DIE creation, we construct the context first. Ensure that we create the context before we create a type so that we can add the newly created type to the parent. Remove last use of addToContextOwner now that it's not needed. We use createAndAddDIE to wrap around "new DIE(". Now all shareable DIEs should be added to their parents right after the creation. Reviewed off-list by Eric, Thanks. llvm-svn: 193657
* Debug Info: add a helper function createAndAddDIE.Manman Ren2013-10-291-0/+4
| | | | | | | | | | | | | | It wraps around "new DIE(" and handles the bookkeeping part of the newly-created DIE. It adds the DIE to its parent, and calls insertDIE if necessary. It makes sure that bookkeeping is done at the earliest time and we should not see parentless DIEs if all constructions of DIEs go through this helper function. Later on, we can use an allocator for DIE allocation, and will only need to change createAndAddDIE instead of modifying all the "new DIE(". Reviewed off-list by Eric. llvm-svn: 193566
* Fix name of variable in comment.Eric Christopher2013-10-241-1/+1
| | | | llvm-svn: 193373
* Debug Info: code clean up.Manman Ren2013-10-231-9/+9
| | | | | | | | | | | Since we never insert DIE for DITemplateTypeParameter to a map, there is no need to call getDIE in getOrCreateTemplateTypeParameterDIE. It is also renamed to constructTemplateTypeParameterDIE to match with other construct functions in CompileUnit. Same applies to getOrCreateTemplateValueParameterDIE. llvm-svn: 193287
* Debug Info: code clean up.Manman Ren2013-10-231-2/+2
| | | | | | | Rename createMemberDIE to constructMemberDIE to match other construct functions in CompileUnit. llvm-svn: 193286
* Debug Info: code clean up.Manman Ren2013-10-231-4/+4
| | | | | | | Remove the unneeded return values from createMemberDIE, constructEnumTypeDIE, getOrCreateTemplateTypeParameterDIE, and getOrCreateTemplateValueParameterDIE. llvm-svn: 193285
* Debug Info: code clean up.Manman Ren2013-10-231-6/+6
| | | | | | | | | Unifying the argument ordering of private construct functions in CompileUnit to follow constructTypeDIE(DIE &, DIBasicType), constructTypeDIE(DIE &, DIDerivedType), constructTypeDIE(DIE &, DICompositeType), constructSubrangeDIE and constructArrayTypeDIE. llvm-svn: 193284
* DebugInfo: Put each kind of constant (form, attribute, tag, etc) into its ↵David Blaikie2013-10-211-19/+27
| | | | | | | | | | | own enum for ease of use. This allows various variables to be more self-documenting and easier to debug by being of specific types without overlapping enum values. Precommit review by Eric Christopher. llvm-svn: 193091
* Debug Info: add a newly-created DIE to a parent in the same function.Manman Ren2013-10-181-10/+12
| | | | | | | | | | With this commit, all DIEs created in CompileUnit will be added to parents inside the same function. Also make getOrCreateTemplateType|Value functions private. No functionality change. llvm-svn: 193002
* According to the dwarf standard pubnames and pubtypes for languagesEric Christopher2013-10-171-1/+5
| | | | | | | | | | | like C++ should be the fully qualified names for the type. Add a routine that does a language specific context walk to build up the qualified name and use it when we add types/names to the tables. Expand the gnu pubnames testcase as it's the most complex to make sure that qualified types are also being added. llvm-svn: 192865
* Debug Info: static member DIE creation.Manman Ren2013-10-141-2/+2
| | | | | | | | | | | | | Clean up creation of static member DIEs. We can create static member DIEs from two places, so we call getOrCreateStaticMemberDIE from the two places. getOrCreateStaticMemberDIE will get or create the context DIE first, then it will check if the DIE already exists, if not, we create the static member DIE and add it to the context. Creation of static member DIEs are handled in a similar way as subprogram DIEs. llvm-svn: 192618
* Debug Info: remove form from function addDIEEntry.Manman Ren2013-10-111-1/+1
| | | | | | | | | The form must be a reference form in addDIEEntry. Which reference form to use will be decided by the callee. No functionality change. llvm-svn: 192517
* Reorganize some member variables and update a comment.Eric Christopher2013-10-051-6/+6
| | | | llvm-svn: 192017
* Fix one comment and update another. Slightly reformat.Eric Christopher2013-10-051-1/+1
| | | | llvm-svn: 192016
* Add a resolve method on CompileUnit that forwards to DwarfDebug.Eric Christopher2013-10-051-2/+7
| | | | llvm-svn: 192014
* Make a bunch of CompileUnit member functions private.Eric Christopher2013-10-051-35/+37
| | | | llvm-svn: 192009
* Remove odd use of this.Eric Christopher2013-10-041-1/+1
| | | | llvm-svn: 192004
* Reformat some odd formattings.Eric Christopher2013-10-041-32/+19
| | | | llvm-svn: 192003
* Tighten up some type arguments to functions. Where we expect aEric Christopher2013-10-041-2/+2
| | | | | | scope, pass a scope. llvm-svn: 192002
* Temporarily revert r176882 as it needs to be implemented in a differentEric Christopher2013-10-041-5/+0
| | | | | | way for all platforms. llvm-svn: 191975
* Move emission of the debug string table to early in the debugEric Christopher2013-09-201-16/+10
| | | | | | | info finalization to greatly reduce the number of fixups that the assembler has to handle in order to improve compile time. llvm-svn: 191119
* Migrate addGlobalName to the .cpp file as an intermediate stepEric Christopher2013-09-201-2/+1
| | | | | | to further work. llvm-svn: 191113
* Revert "Give internal classes hidden visibility."Benjamin Kramer2013-09-111-1/+1
| | | | | | | It works with clang, but GCC has different rules so we can't make all of those hidden. This reverts commit r190534. llvm-svn: 190536
* Give internal classes hidden visibility.Benjamin Kramer2013-09-111-1/+1
| | | | | | Worth 100k on a linux/x86_64 Release+Asserts clang. llvm-svn: 190534
* Formatting.Eric Christopher2013-08-261-10/+10
| | | | llvm-svn: 189296
* Remove the language parameter and variable from the compile unit. WeEric Christopher2013-08-261-5/+5
| | | | | | can get it via the MDNode that's passed in. Save that instead. llvm-svn: 189291
* Be more rigorous about the sizes of forms and attributes.Eric Christopher2013-08-081-15/+15
| | | | llvm-svn: 187953
* Formatting.Eric Christopher2013-07-221-1/+1
| | | | llvm-svn: 186851
OpenPOWER on IntegriCloud