summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add (...) around && clause to appeace gcc 4.8's warningEli Bendersky2014-04-281-3/+3
| | | | llvm-svn: 207452
* DebugInfo: Just store the DIE by value in the DwarfUnitDavid Blaikie2014-04-281-11/+7
| | | | | | | | | Since all 4 ctor calls in DwarfDebug just pass in a trivially constructed DIE with the right tag type, sink the tag selection down into the Dwarf*Unit ctors (removing the argument entirely from callers in DwarfDebug) and initialize the DIE member in DwarfUnit. llvm-svn: 207448
* Pass DIEs to DwarfUnit constructors by unique_ptr.David Blaikie2014-04-281-24/+26
| | | | llvm-svn: 207447
* Reformat, 80-col, tab characters, etc.Eric Christopher2014-04-281-14/+13
| | | | llvm-svn: 207444
* Improve explicit memory ownership of DIEsDavid Blaikie2014-04-281-18/+18
| | | | | | | | | | Now that the subtle constructScopeDIE has been refactored into two functions - one returning memory to take ownership of, one returning a pointer to already owning memory - push unique_ptr through more APIs. I think this completes most of the unique_ptr ownership of DIEs. llvm-svn: 207442
* DwarfDebug: Omit DW_AT_object_pointer on inlined_subroutinesDavid Blaikie2014-04-281-27/+50
| | | | | | | | | | | | | | | | While refactoring out constructScopeDIE into two functions I realized we were emitting DW_AT_object_pointer in the inlined subroutine when we didn't need to (GCC doesn't, and the abstract subprogram definition has the information already). So here's the refactoring and the bug fix. This is one step of refactoring to remove some subtle memory ownership semantics. It turns out the original constructScopeDIE returned ownership in its return value in some cases and not in others. The split into two functions now separates those two semantics - further cleanup (unique_ptr, etc) will follow. llvm-svn: 207441
* [C++] Use 'nullptr'.Craig Topper2014-04-281-5/+5
| | | | llvm-svn: 207394
* Debug Info: Prepare DebugLocEntry to handle more than a single value perAdrian Prantl2014-04-271-21/+17
| | | | | | | | | | entry. This is in preparation for generic DW_OP_piece support. No functional change so far. http://reviews.llvm.org/D3373 rdar://problem/15928306 llvm-svn: 207368
* DwarfDebug: Roll argument into call.David Blaikie2014-04-261-10/+6
| | | | llvm-svn: 207334
* DebugInfo: Fix and test a regression caused by r207263 causing the ↵David Blaikie2014-04-261-1/+1
| | | | | | | | DW_AT_object_pointer to go missing on blocks Noticed by inspection. Test coverage added. llvm-svn: 207333
* DWARF Type Units: Avoid emitting type units under fission if the type ↵David Blaikie2014-04-261-4/+41
| | | | | | | | | | | | requires an address. Since there's no way to ensure the type unit in the .dwo and the type unit skeleton in the .o are correlated, this cannot work. This implementation is a bit inefficient for a few reasons, called out in comments. llvm-svn: 207323
* DwarfDebug: Minor refactoring around type unit constructionDavid Blaikie2014-04-261-16/+15
| | | | | | | | | | | | | Sinking addition of the declaration attribute down to where the signature is added. So that if the signature is not added neither is the declaration attribute (this will come in handy when aborting type unit construction to instead emit the type into the CU directly in some cases) Pull out type unit identifier hashing just to simplify the function a little, it'll be getting longer. llvm-svn: 207321
* Make sure that rangelists are also relative to the compile unitEric Christopher2014-04-251-2/+9
| | | | | | | | low_pc similar to location lists. Fixes PR19563 llvm-svn: 207283
* DwarfAccelTable: Store the string symbol in the accelerator table to avoid ↵David Blaikie2014-04-251-8/+8
| | | | | | | | | | duplicate lookup. This also avoids the need for subtly side-effecting calls to manifest strings in the string table at the point where items are added to the accelerator tables. llvm-svn: 207281
* Encapsulate the DWARF string pool in a separate type.David Blaikie2014-04-251-4/+4
| | | | | | | | | Pulls out some more code from some of the rather monolithic DWARF classes. Unlike the address table, the string table won't move up into DwarfDebug - each DWARF file has its own string table (but there can be only one address table). llvm-svn: 207277
* DIE: Pass ownership of children via std::unique_ptr rather than raw pointer.David Blaikie2014-04-251-25/+26
| | | | | | | | | | | This should reduce the chance of memory leaks like those fixed in r207240. There's still some unclear ownership of DIEs happening in DwarfDebug. Pushing unique_ptr and references through more APIs should help expose the cases where ownership is a bit fuzzy. llvm-svn: 207263
* DIEEntry: Refer to the specified DIE via reference rather than pointer.David Blaikie2014-04-251-7/+7
| | | | | | | Makes some more cases (the unit tests, specifically), lexically compatible with a change to unique_ptr. llvm-svn: 207261
* DwarfUnit: return by reference from createAndAddDIEDavid Blaikie2014-04-251-14/+14
| | | | | | | Since this doesn't return ownership (the DIE has been added to the specified parent already) nor return null, just return by reference. llvm-svn: 207259
* Return DIE by reference instead of pointer from DwarfUnit::getUnitDieDavid Blaikie2014-04-251-12/+12
| | | | llvm-svn: 207255
* DwarfUnit: Suddently, DIE references, everywhere.David Blaikie2014-04-251-44/+44
| | | | | | | | This'll make changing to unique_ptr ownership of DIEs easier since the usages will now have '*' on them making them textually compatible between unique_ptr and raw pointer. llvm-svn: 207253
* [C++] Use 'nullptr'.Craig Topper2014-04-241-47/+48
| | | | llvm-svn: 207083
* Remove unused parameterDavid Blaikie2014-04-241-4/+3
| | | | llvm-svn: 207061
* Remove the intermediate AccelTypes maps in DWARF units.David Blaikie2014-04-241-15/+16
| | | | llvm-svn: 207060
* Remove the intermediate AccelNamespace maps in DWARF units.David Blaikie2014-04-241-13/+12
| | | | llvm-svn: 207059
* Remove the intermediate AccelObjC maps in DWARF unitsDavid Blaikie2014-04-241-15/+14
| | | | llvm-svn: 207057
* And actually use the DwarfDebug::AccelNames to emit the names.David Blaikie2014-04-231-12/+2
| | | | | | Fix for r207049 which would've emitted no accelerated names at all... llvm-svn: 207051
* More formatting...David Blaikie2014-04-231-1/+2
| | | | llvm-svn: 207050
* Remove intermediate accelerator table for names.David Blaikie2014-04-231-6/+18
| | | | | | (similar changes coming for the other accelerator tables) llvm-svn: 207049
* DwarfAccelTable: Remove trivial dtor and simplify construction with an array.David Blaikie2014-04-231-7/+4
| | | | llvm-svn: 207044
* Move the AddressPool from DwarfFile to DwarfDebug.David Blaikie2014-04-231-4/+3
| | | | | | | | | There's only ever one address pool, not one per DWARF output file, so let's just have one. (similar refactoring of the string pool to come soon) llvm-svn: 207026
* Separate out the DWARF address pool into its own type/files.David Blaikie2014-04-231-3/+4
| | | | llvm-svn: 207022
* Split out DwarfFile from DwarfDebug into its own .h/.cpp files.David Blaikie2014-04-231-230/+0
| | | | | | | | Some of these types (DwarfDebug in particular) are quite large to begin with (and I keep forgetting whether DwarfFile is in DwarfDebug or DwarfUnit... ) so having a few smaller files seems like goodness. llvm-svn: 207010
* Requisite reformatting for previous commit.David Blaikie2014-04-221-19/+16
| | | | llvm-svn: 206927
* Push memory ownership of DwarfUnits into clients of DwarfFile.David Blaikie2014-04-221-125/+129
| | | | | | | | | | | | This prompted me to push references through most of DwarfDebug. Sorry for the churn. Honestly it's a bit silly that we're passing around units all over the place like that anyway and I think it's mostly due to the DIE attribute adding utility functions being utilities in DwarfUnit. I should have another go at moving them out of DwarfUnit... llvm-svn: 206925
* Use std::unique_ptr to handle ownership of DwarfUnits in DwarfFile.David Blaikie2014-04-221-20/+25
| | | | | | | So Chandler - how about those range algorithms? (would really love a dereferencing range adapter for this sort of stuff) llvm-svn: 206921
* Simplify address pool index assignment.David Blaikie2014-04-221-3/+1
| | | | llvm-svn: 206905
* Revert "Use value semantics to manage DbgVariables rather than dynamic ↵David Blaikie2014-04-221-45/+50
| | | | | | | | | | | allocation/pointers." This reverts commit r206780. This commit was regressing gdb.opt/inline-locals.exp in the GDB 7.5 test suite. Reverting until I can fix the issue. llvm-svn: 206867
* [Modules] Remove potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-221-1/+2
| | | | | | | | | | | | define below all header includes in the lib/CodeGen/... tree. While the current modules implementation doesn't check for this kind of ODR violation yet, it is likely to grow support for it in the future. It also removes one layer of macro pollution across all the included headers. Other sub-trees will follow. llvm-svn: 206837
* Use value semantics to manage DbgVariables rather than dynamic ↵David Blaikie2014-04-211-50/+45
| | | | | | | | | | allocation/pointers. Requires switching some vectors to lists to maintain pointer validity. These could be changed to forward_lists (singly linked) with a bit more work - I've left comments to that effect. llvm-svn: 206780
* Fix bug 19437 - Only add discriminators for DWARF 4 and above.Diego Novillo2014-04-171-9/+1
| | | | | | | | | | | | | | Summary: This prevents the discriminator generation pass from triggering if the DWARF version being used in the module is prior to 4. Reviewers: echristo, dblaikie CC: llvm-commits Differential Revision: http://reviews.llvm.org/D3413 llvm-svn: 206507
* Use std::unique_ptr for DIE childrenDavid Blaikie2014-04-141-21/+19
| | | | | | | | | Got bored, removed some manual memory management. Pushed references (rather than pointers) through a few APIs rather than replacing *x with x.get(). llvm-svn: 206222
* Use dwarf::Tag rather than unsigned for DIE::Tag to make debugging easier.David Blaikie2014-04-121-3/+1
| | | | | | | | | | | Nice to be able to just print out the Tag and have the debugger print dwarf::DW_TAG_subprogram or whatever, rather than an int. It's a bit finicky (for example DIDescriptor::getTag still returns unsigned) because some places still handle real dwarf tags + our fake tags (one day we'll remove the fake tags, hopefully). llvm-svn: 206098
* Debug info: Store the DIVariable in DebugLocEntry also for constants,Adrian Prantl2014-04-111-3/+5
| | | | | | | | so DwarfDebug::emitDebugLocEntry can emit them with the correct signedness. rdar://problem/15928306 llvm-svn: 206042
* Debug info: Factor the retrieving of the DIVariable from a MachineInstrAdrian Prantl2014-04-101-3/+2
| | | | | | into a function. llvm-svn: 205973
* Adjust comments regarding non-relocated abbrev offset in debug_info.dwoDavid Blaikie2014-04-021-1/+3
| | | | | | | | I'm not sure the comment in the implementation really adds a lot of value (it's clear that we emit zero when no symbol is provided, but it doesn't explain why we would do that). Happy to iterate. llvm-svn: 205386
* Split debug_loc and debug_loc.dwo emission into two separate functionsDavid Blaikie2014-04-021-21/+29
| | | | | | Based on code review feedback from Eric Christopher on r204697 llvm-svn: 205385
* DebugInfo: Introduce DebugLocList to encapsulate a list of DebugLocEntries ↵David Blaikie2014-04-021-6/+7
| | | | | | | | | | | | and an MC Label to refer to them This removes the magic-number-esque code creating/retrieving the same label for a debug_loc entry from two places and removes the last small piece of reusable logic from emitDebugLoc so that there will be less duplication when refactoring it into two functions (one for debug_loc, the other for debug_loc.dwo). llvm-svn: 205382
* DebugInfo: Factor out common functionality for rendering debug_loc and ↵David Blaikie2014-04-011-10/+14
| | | | | | | | | debug_loc.dwo location list entries In preparation for refactoring this function into two, one for debug_loc, one for debug_loc.dwo. llvm-svn: 205324
* Cleanup remaining use of removed variable to fix the buildDavid Blaikie2014-04-011-1/+1
| | | | llvm-svn: 205323
* Simplify debug_loc.dwo handling slightly.David Blaikie2014-04-011-1/+1
| | | | llvm-svn: 205322
OpenPOWER on IntegriCloud