summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Sink DwarfUnit::addExpr into DwarfCompileUnitDavid Blaikie2014-11-021-0/+7
| | | | llvm-svn: 221090
* Fix the build from the last commitDavid Blaikie2014-11-021-2/+2
| | | | llvm-svn: 221089
* Sink DwarfUnit::applyVariableAttributes into DwarfCompileUnitDavid Blaikie2014-11-021-0/+11
| | | | llvm-svn: 221088
* Sink DwarfUnit::addLocationList down into DwarfCompileUnitDavid Blaikie2014-11-021-0/+9
| | | | llvm-svn: 221087
* Sink DwarfUnit::addComplexAddress down into DwarfCompileUnitDavid Blaikie2014-11-021-0/+57
| | | | llvm-svn: 221086
* Push DwarfUnit::addAddress down into DwarfCompileUnitDavid Blaikie2014-11-021-0/+19
| | | | llvm-svn: 221085
* Sink DwarfUnit::addVariableAddress into DwarfCompileUnit since type units ↵David Blaikie2014-11-021-0/+12
| | | | | | don't have variables llvm-svn: 221084
* DebugInfo: Sink accelerator table lists down (GlobalNames/Types) into ↵David Blaikie2014-11-021-0/+17
| | | | | | DwarfCompileUnit llvm-svn: 221083
* Be sure to initialize DwarfCompileUnit::LabelBegin now that it may be ↵David Blaikie2014-11-021-1/+1
| | | | | | skipped in initSection llvm-svn: 221079
* Don't bother creating LabelBegin for .dwo unitsDavid Blaikie2014-11-021-2/+3
| | | | | | | | | | This would help catch cases where we might otherwise try to reference a dwo CU label, which would be weird - because without relocations in the dwo file it's not generally meaningful to talk about the CU offsets there (or, if it is, we can do so in absolute terms without using a relocation to compute it). llvm-svn: 221078
* Sink dwarf unit length emission down into DwarfUnit::emitHeaderDavid Blaikie2014-11-011-0/+8
| | | | | | | | This allows the CU label to be emitted only for compile units, as they're the only ones that need it (so they can be referenced from pubnames) llvm-svn: 221072
* Sink DwarfUnit::Skeleton down into DwarfCompileUnitDavid Blaikie2014-11-011-1/+2
| | | | | | | | | Type units no longer have skeletons and it's misleading to be able to query for a type unit's skeleton (it might incorrectly lead one to conclude that if a unit doesn't have a skeleton it's not in a .dwo file... ). llvm-svn: 221055
* Sink DwarfDebug::AbstractSPDies down into DwarfFileDavid Blaikie2014-11-011-4/+4
| | | | | | | | | | | This is the first big step to allowing gmlt-like inline scope information in the skeleton CU. While this commit doesn't change the functionality, it's only a small step to call "constructAbstractSubprogramDIE" on both the InfoHolder and the SkeletonHolder (when in use) and that will at least create the abstract SP dies in that case, though still not creating the other subprograms. llvm-svn: 221051
* Sink some of DwarfDebug::collectDeadVariables down into DwarfCompileUnit.David Blaikie2014-10-311-0/+21
| | | | llvm-svn: 221010
* Sink most of DwarfDebug::constructAbstractSubprogramScopeDIE into ↵David Blaikie2014-10-311-8/+11
| | | | | | DwarfCompileUnit llvm-svn: 221005
* Sink DwarfUnit::constructImportedEntityDIE into DwarfCompileUnit.Frederic Riss2014-10-241-0/+28
| | | | | | | | | | So that it has access to getOrCreateGlobalVariableDIE. If we ever support decsribing using directive in C++ classes (thus requiring support in type units), it will certainly use another mechanism anyway. Differential Revision: http://reviews.llvm.org/D5975 llvm-svn: 220594
* DebugInfo: Sink DwarfDebug::ScopeVariables down into DwarfFileDavid Blaikie2014-10-241-1/+1
| | | | | | | | (part of refactoring to allow subprogram emission in both the skeleton and main units to enable -gmlt-like data to be included in the skeleton for live inlined backtracing purposes) llvm-svn: 220578
* DebugInfo: Remove DwarfDebug::CurrentFnArguments since we have to handle ↵David Blaikie2014-10-231-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument ordering of other arguments (abstract arguments) in the same way and already have code for that too. While refactoring this code I was confused by both the name I had introduced (addNonArgumentVariable... but it has all this logic to handle argument numbering and keep things in order?) and by the redundancy. Seems when I fixed the misordered inlined argument handling, I didn't realize it was mostly redundant with the argument ordering code (which I may've also written, I'm not sure). So let's just rely on the more general case. The only oddity in output this produces is that it means when we emit all the variables for the current function, we don't track when we've finished the argument variables and are about to start the local variables and insert DW_AT_unspecified_parameters (for varargs functions) there. Instead it ends up after the local variables, scopes, etc. But this isn't invalid and doesn't cause DWARF consumers problems that I know of... so we'll just go with that because it makes the code nice & simple. (though, let's see what the buildbots have to say about this - *crosses fingers*) There will be some cleanup commits to follow to remove the now trivial wrappers, etc. llvm-svn: 220527
* DebugInfo: Simplify/tidy/correct global variable decl/def emission handling.David Blaikie2014-10-231-51/+26
| | | | | | | | | | | | | | | | | | | | | | | This fixes a bug (introduced by fixing the IR emitted from Clang where the definition of a static member would be scoped within the class, rather than within its lexical decl context) where the definition of a static variable would be placed inside a class. It also improves source fidelity by scoping static class member definitions inside the lexical decl context in which tehy are written (eg: namespace n { class foo { static int i; } int foo::i; } - the definition of 'i' will be within the namespace 'n' in the DWARF output now). Lastly, and the original goal, this reduces debug info size slightly (and makes debug info easier to read, etc) by placing the definitions of non-member global variables within their namespace, rather than using a separate namespace-scoped declaration along with a definition at global scope. Based on patches and discussion with Frédéric. llvm-svn: 220497
* Sink the per-CU part of DwarfDebug::finishSubprogramDefinitions into ↵David Blaikie2014-10-101-0/+18
| | | | | | DwarfCompileUnit. llvm-svn: 219477
* Sink most of DwarfDebug::constructAbstractSubprogramScopeDIE down into ↵David Blaikie2014-10-101-0/+29
| | | | | | DwarfCompileUnit. llvm-svn: 219476
* Sink DwarfDebug::createAndAddScopeChildren down into DwarfCompileUnit.David Blaikie2014-10-091-2/+14
| | | | llvm-svn: 219437
* Sink DwarfDebug::constructSubprogramScopeDIE down into DwarfCompileUnitDavid Blaikie2014-10-091-0/+40
| | | | llvm-svn: 219436
* Sink DwarfDebug::createScopeChildrenDIE down into DwarfCompileUnit.David Blaikie2014-10-091-2/+21
| | | | llvm-svn: 219422
* Sink DwarfDebug.cpp::constructVariableDIE into DwarfCompileUnit.David Blaikie2014-10-091-0/+8
| | | | llvm-svn: 219419
* Move DwarfUnit::constructVariableDIE down to DwarfCompileUnit, since it's ↵David Blaikie2014-10-091-0/+65
| | | | | | only needed there. llvm-svn: 219418
* Sink DwarfDebug::constructLexicalScopeDIE into DwarfCompileUnitDavid Blaikie2014-10-091-1/+17
| | | | llvm-svn: 219414
* Missing reformattingDavid Blaikie2014-10-091-1/+1
| | | | llvm-svn: 219413
* Sink DwarfDebug::constructInlinedScopeDIE into DwarfCompileUnitDavid Blaikie2014-10-091-1/+31
| | | | | | | | | | | This introduces access to the AbstractSPDies map from DwarfDebug so DwarfCompileUnit can access it. Eventually this'll sink down to DwarfFile, but it'll still be generically accessible - not much encapsulation to provide it. (constructInlinedScopeDIE could stay further up, in DwarfFile to avoid exposing this - but I don't think that's particularly better) llvm-svn: 219411
* Push DwarfDebug::attachRangesOrLowHighPC down into DwarfCompileUnitDavid Blaikie2014-10-091-0/+10
| | | | llvm-svn: 219372
* Sink DwarfDebug::addScopeRangeList down into DwarfCompileUnitDavid Blaikie2014-10-091-0/+26
| | | | | | | | | | | | | (& add a few accessors/make a couple of things public for this - it's a bit of a toss-up, but I think I prefer it this way, keeping some more of the meaty code down in DwarfCompileUnit - if only to make for smaller implementation files, etc) I think we could simplify range handling a bit if we removed the range lists from each unit and just put a single range list on DwarfDebug, similar to address pooling. llvm-svn: 219370
* Sink DwarfUnit::addSectionDelta into DwarfCompileUnit, the only place it's ↵David Blaikie2014-10-081-0/+8
| | | | | | needed. llvm-svn: 219364
* Sink and coalesce DwarfDebug.cpp::addSectionLabel and ↵David Blaikie2014-10-081-5/+14
| | | | | | DwarfUnit::addSectionLabel down into DwarfCompileUnit::addSectionLabel llvm-svn: 219351
* Push DwarfDebug::constructScopeDIE down into DwarfCompileUnitDavid Blaikie2014-10-081-0/+59
| | | | | | | | | | One of many steps to generalize subprogram emission to both the DWO and non-DWO sections (to emit -gmlt-like data under fission). Once the functions are pushed down into DwarfCompileUnit some of the data structures will be pushed at least into DwarfFile so that they can be unique per-file, allowing emission to both files independently. llvm-svn: 219345
* Sink DwarfDebug::updateSubprogramScopeDIE into DwarfCompileUnitDavid Blaikie2014-10-041-0/+30
| | | | | | | | | | | | | This requires exposing some of the current function state from DwarfDebug. I hope there's not too much of that to expose as I go through all the functions, but it still seems nicer to expose singular data down to multiple consumers, than have consumers expose raw mapping data structures up to DwarfDebug for building subprograms. Part of a series of refactoring to allow subprograms in both the skeleton and dwo CUs under Fission. llvm-svn: 219060
* Reformatting accidentally left out of r219057David Blaikie2014-10-041-1/+2
| | | | llvm-svn: 219059
* Sink DwarfDebug::attachLowHighPC into DwarfCompileUnitDavid Blaikie2014-10-041-0/+14
| | | | | | | One of many things to sink down into DwarfCompileUnit to allow handling of subprograms in both the skeleton and dwo CU under Fission. llvm-svn: 219058
* Move DwarfCompileUnit from DwarfUnit.h to its own header (DwarfCompileUnit.h)David Blaikie2014-10-041-0/+277
| | | | | | | | | | | | In preparation for sinking all the subprogram emission code down from DwarfDebug into DwarfCompileUnit, this will avoid bloating DwarfUnit.h/cpp greatly and make concerns a bit more clear/isolated. (sinking this handling down is part of the work to handle emitting minimal subprograms for -gmlt-like data into the skeleton CU under fission) llvm-svn: 219057
* DebugInfo: Rename DwarfCompileUnit.* to DwarfUnit.* to match their contents.David Blaikie2013-12-021-1983/+0
| | | | llvm-svn: 196140
* DebugInfo: Refactor CompileUnit into a Unit baseclass and ↵David Blaikie2013-12-021-109/+97
| | | | | | | | | | CompileUnit/TypeUnit derived classes. Header/cpp file rename to follow immediately - just splitting out the commits for ease of review/reading to demonstrate that the renaming changes are entirely mechanical. llvm-svn: 196139
* DebugInfo: Type Units: Propagate the correct DW_AT_language into type units.David Blaikie2013-12-021-1/+1
| | | | llvm-svn: 196130
* DebugInfo: Do not include variables only referenced by templates in aranges.David Blaikie2013-11-271-3/+6
| | | | | | | | ARanges included even extern variables referenced by pointer non-type template parameters even though that variable isn't part of this compilation unit. llvm-svn: 195895
* DebugInfo: Remove CompileUnit::constructTypeDIEImpl now that it's just a ↵David Blaikie2013-11-261-11/+2
| | | | | | | | | 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: Avoid emitting pubtype entries for type DIEs that just indirect ↵David Blaikie2013-11-261-37/+43
| | | | | | to a type unit. llvm-svn: 195698
* DebugInfo: Pubtypes: Coelesce pubtype registration with accelerator type ↵David Blaikie2013-11-261-39/+12
| | | | | | | | | | 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-9/+29
| | | | | | | | | | | | | | | | | | | | | 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-4/+4
| | | | llvm-svn: 195299
* Reorder language in the CompileUnit description and add a comment.Eric Christopher2013-11-211-4/+4
| | | | | | Language may only be a temporary addition. llvm-svn: 195296
* DwarfCompileUnit: Initialize DebugInfoOffset.David Blaikie2013-11-201-2/+2
| | | | | | | | | | | | While not strictly necessary (the class has an invariant that "setDebugInfoOffset" is called before "getDebugInfoOffset" - anyone client that actually gets the default zero offset is buggy/broken) this is consistent with the code as originally written and the removal of the initialization was an accident in r195166. Suggested by Manman Ren. llvm-svn: 195263
* CR feedback for r195166: Add comments regarding type unit mapping and type ↵David Blaikie2013-11-201-2/+7
| | | | | | | | units disabling cross-CU sharing. Changes suggested by Manman Ren. llvm-svn: 195262
OpenPOWER on IntegriCloud