summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "DebugInfo: Include lexical scopes in inlined subroutines."David Blaikie2014-05-121-7/+5
| | | | | | | | | This reverts commit r208506. Some inlined subroutine scopes appear to be missing with this change. Reverting while I investigate. llvm-svn: 208642
* DebugInfo: Attach DW_AT_inline to inlined subprograms at DIE-construction ↵David Blaikie2014-05-121-4/+1
| | | | | | time rather than as a post-processing step. llvm-svn: 208636
* DwarfDebug: Avoid an extra map lookup while constructing abstract scope DIEs ↵David Blaikie2014-05-121-19/+20
| | | | | | | | | | and reduce nesting/conditionals. One test case had to be updated as it still had the extra indirection for the variable list - removing the extra indirection got it back to passing. llvm-svn: 208608
* DebugInfo: Include lexical scopes in inlined subroutines.David Blaikie2014-05-111-5/+7
| | | | llvm-svn: 208506
* Use a single data structure to store all user variables in DwarfDebugAlexey Samsonov2014-04-301-12/+11
| | | | | | | | | | | | | | | | | | Summary: Get rid of UserVariables set, and turn DbgValues into MapVector to get a fixed ordering, as suggested in review for http://reviews.llvm.org/D3573. Test Plan: llvm regression tests Reviewers: dblaikie Reviewed By: dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D3579 llvm-svn: 207720
* Revert "Emit DW_AT_object_pointer once, on the declaration, for each function."David Blaikie2014-04-301-9/+4
| | | | | | | | | | | | | | Breaks GDB buildbot (http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/14517) GCC emits DW_AT_object_pointer /everywhere/ (declaration, abstract definition, inlined subroutine), but it looks like GCC relies on it being somewhere other than the declaration, at least. I'll experiment further & can hopefully still remove it from the inlined_subroutine. This reverts commit r207705. llvm-svn: 207719
* DebugInfo: Omit DW_AT_artificial on DW_TAG_formal_parameters in ↵David Blaikie2014-04-301-12/+21
| | | | | | | | | | | | DW_TAG_inlined_subroutines. They just don't need to be there - they're inherited from the abstract definition. In theory I would like them to be inherited from the declaration, but the DWARF standard doesn't quite say that... we can probably do it anyway but I'm less confident about that so I'll leave it for a separate commit. llvm-svn: 207717
* Convert more loops to range-based equivalentsAlexey Samsonov2014-04-301-9/+7
| | | | llvm-svn: 207714
* Slightly simplify code in DwarfDebug::beginFunctionAlexey Samsonov2014-04-301-7/+5
| | | | llvm-svn: 207710
* Move logic for calculating DBG_VALUE history map into separate file/class.Alexey Samsonov2014-04-301-119/+18
| | | | | | | | | | | | | | | | Summary: No functionality change. Test Plan: llvm regression test suite. Reviewers: dblaikie Reviewed By: dblaikie Subscribers: echristo, llvm-commits Differential Revision: http://reviews.llvm.org/D3573 llvm-svn: 207708
* Emit DW_AT_object_pointer once, on the declaration, for each function.David Blaikie2014-04-301-4/+9
| | | | | | | | | | | | | | | | This effectively reverts r164326, but adds some comments and justification and ensures we /don't/ emit the DW_AT_object_pointer on the (abstract and concrete) definitions. (while still preserving it on standalone definitions involving ObjC Blocks) This does increase the size of member function declarations from 7 to 11 bytes, unfortunately, but still seems like the Right Thing to do so that callers that see only the declaration still have the information about the object pointer. That said, I don't know what, if any, DWARF consumers don't have a heuristic to guess this in the case of normal C++ member functions - perhaps we can remove it entirely. llvm-svn: 207705
* Fix the clang-cl self-host build by defining ~DwarfDebug out of lineReid Kleckner2014-04-301-0/+3
| | | | | | | | | | | | DwarfDebug.h has a SmallVector member containing a unique_ptr of an incomplete type. MSVC doesn't have key functions, so the vtable and dtor are emitted in AsmPrinter.cpp, where DwarfDebug's ctor is called. AsmPrinter.cpp include DwarfUnit.h and doesn't get a complete definition of DwarfTypeUnit. We could fix the problem by including DwarfUnit.h in DwarfDebug.h, but that would increase header bloat. Instead, define ~DwarfDebug out of line. llvm-svn: 207701
* Fix some 80 cols violations committed in r207539David Blaikie2014-04-291-2/+4
| | | | | | Caught by Eric Christopher in post-commit review. llvm-svn: 207595
* DwarfDebug: Split the initialization of abstract and non-abstract subprogram ↵David Blaikie2014-04-291-30/+36
| | | | | | | | | | | DIEs. These were called from distinct places and had significant distinct behavior. No need to make that a dynamic check inside the function rather than just having two functions (refactoring some common code into a helper function to be called from the two separate functions). llvm-svn: 207539
* Remove DwarfUnit::LabelRange since it's unused.David Blaikie2014-04-281-3/+0
| | | | | | | | | | | Seems at some point the intent was to emit fission ranges_base as unique per CU but the code today emits ranges_base as the start of the ranges section for all CUs being compiled and all the ranges_base relative addresses are relative to that. So removing this dead code and leaving the status quo until there's a reason to change it (perhaps something's faster if it has distinct ranges for each CU). llvm-svn: 207464
* Satisfy sub-optimal GCC warning.David Blaikie2014-04-281-4/+4
| | | | | | | | (Clang doesn't warn here because it knows the string is benign - the assert still checks what it's intended to - though putting the correct parens does make clang-format format the code a little better) llvm-svn: 207456
* 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
OpenPOWER on IntegriCloud