summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Address review comments for r202188.Adrian Prantl2014-02-251-11/+11
| | | | | | | | | This is refactoring / simplifying code, updating comments and enabling the testcase on non-x86 platforms. No functionality change. llvm-svn: 202199
* Debug info: Support variadic functions.Adrian Prantl2014-02-251-20/+23
| | | | | | | | | | | | | | Variadic functions have an unspecified parameter tag after the last argument. In IR this is represented as an unspecified parameter in the subroutine type. Paired commit with CFE r202185. rdar://problem/13690847 This re-applies r202184 + a bugfix in DwarfDebug's argument handling. llvm-svn: 202188
* Revert "Debug info: Support variadic functions."Adrian Prantl2014-02-251-23/+20
| | | | | | This reverts commit r202184 because of buildbot breakage. llvm-svn: 202187
* Debug info: Support variadic functions.Adrian Prantl2014-02-251-20/+23
| | | | | | | | | | | | Variadic functions have an unspecified parameter tag after the last argument. In IR this is represented as an unspecified parameter in the subroutine type. Paired commit with CFE. rdar://problem/13690847 llvm-svn: 202184
* Make DIELoc/DIEBlock's ComputeSize method const. Add a setSizeEric Christopher2014-02-201-2/+2
| | | | | | | method to actually set it in the class to avoid computing it multiple times. llvm-svn: 201751
* Remove FIXME that had snuck in.Eric Christopher2014-02-201-1/+0
| | | | llvm-svn: 201745
* Add a DIELoc class to cover the DW_FORM_exprloc set of expressionsEric Christopher2014-02-161-55/+62
| | | | | | | | | | | | | alongside DIEBlock and replace uses accordingly. Use DW_FORM_exprloc in DWARF4 and later code. Update testcases. Adding a DIELoc instead of using extra forms inside DIEBlock so that we can keep location expressions separate from other uses. No direct use at the moment, however, it's not a lot of code and using a separately named class keeps it somewhat more obvious what's going on in various locations. llvm-svn: 201481
* DebugInfo: Deduplicate entries in the fission address tableDavid Blaikie2014-02-151-4/+4
| | | | | | | | | | | | This broke in r185459 while TLS support was being generalized to handle non-symbol TLS representations. I thought about/tried having an enum rather than a bool to track the TLS-ness of the address table entry, but namespaces and naming seemed more hassle than it was worth for only one caller that needed to specify this. llvm-svn: 201469
* DebugInfo: Implement DW_AT_stmt_list for type unitsDavid Blaikie2014-02-141-0/+8
| | | | | | | | | Type units will share the statement list of their defining compile unit. This is a tradeoff that reduces .o debug info size at the cost of some linked debug info size (since the contents of those string tables won't be deduplicated along with the type unit) which seems right for now. llvm-svn: 201445
* DwarfUnit: Remove unnecessarily explicit/out of line virtual dtors.David Blaikie2014-02-141-4/+0
| | | | | | | These types have an out of line virtual function each (emitHeader at least) so they won't have weak vtables - no need for more than that. llvm-svn: 201444
* DwarfUnit: Remove unnecessary (void)t; that was previously used to suppress ↵David Blaikie2014-02-141-1/+0
| | | | | | -Wunused-member-variable llvm-svn: 201442
* DwarfUnit: Refactor out DW_AT_stmt_list creation into common function for ↵David Blaikie2014-02-141-0/+27
| | | | | | | | | | | | | | | fission and non-fission cases This probably also addresses the FIXME in the fission case regarding multiple compile units, though I haven't tested that. This code still confuses me (the literal zero offset makes little sense, the limitations surrounding asm output I'm not sure about either - but perhaps we should just always emit one line table? Or should we not rely on .loc/.file even in assembly so we can produce the same output between asm and object output?) but this maintains the existing functionality. llvm-svn: 201441
* Reformat a few lines with clang-format.Eric Christopher2014-02-121-4/+8
| | | | llvm-svn: 201265
* 80-col.Eric Christopher2014-02-121-1/+2
| | | | llvm-svn: 201264
* Debug info: Bugfix for r201190: DW_OP_piece takes bytes, not bits.Adrian Prantl2014-02-121-1/+2
| | | | | | rdar://problem/16015314 llvm-svn: 201253
* DwarfUnit: Include type unit's file strings in the defining compile unit's ↵David Blaikie2014-02-121-1/+2
| | | | | | | | | | file_names table There's still one piece missing here, which is adding the DW_AT_stmt_list to the type unit that refer's to the compile unit's line table. Working on that. llvm-svn: 201198
* DwarfUnit: Provide a reference to a defining DwarfCompileUnit from ↵David Blaikie2014-02-121-3/+5
| | | | | | | | | DwarfTypeUnit. Type units need to insert their file strings into the compile unit's line/file table. This is preliminary work to that end. llvm-svn: 201196
* DwarfUnit: Refactor DW_AT_file creation into a common function.David Blaikie2014-02-121-51/+18
| | | | | | | | This is preliminary work to fix type unit file strings so they appear in their originating CU's line table - but it's also just good/simple cleanup, so I'm committing it ahead of time. llvm-svn: 201195
* DwarfUnit: Replace unnecessary conditionals with asserts.David Blaikie2014-02-111-18/+6
| | | | | | | | We used to be pretty vague about what debug entities were what, with many conditionals to silently drop/skip/accept things. These don't seem to be relevant anymore. llvm-svn: 201194
* Reapply r201180 with an additional error path.Adrian Prantl2014-02-111-1/+34
| | | | | | | | | | | | Debug info: Emit values in subregisters that do not have a separate DWARF register number by emitting a super-register + DW_OP_bit_piece. This is necessary because on x86_64, there are no DWARF register numbers for i386-style subregisters. Fixes a bunch of FIXMEs. rdar://problem/16015314 llvm-svn: 201190
* Revert "Debug info: Emit values in subregisters that do not have a separate"Adrian Prantl2014-02-111-34/+1
| | | | | | This reverts commit r201179 for buildbot breakage. llvm-svn: 201188
* Debug info: Emit values in subregisters that do not have a separateAdrian Prantl2014-02-111-1/+34
| | | | | | | | | | | DWARF register number by emitting a super-register + DW_OP_bit_piece. This is necessary because on x86_64, there are no DWARF register numbers for i386-style subregisters. Fixes a bunch of FIXMEs. rdar://problem/16015314 llvm-svn: 201180
* DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer ↵David Blaikie2014-02-041-2/+1
| | | | | | | | | | | emits zero-length arrays as {i32 0} A bunch of test cases needed to be cleaned up for this, many my fault - when implementid imported modules I updated test cases by simply duplicating the prior metadata field - which wasn't always the empty metadata entry. llvm-svn: 200731
* If we're not producing DWARF accel tables, don't waste memoryPaul Robinson2014-01-311-0/+4
| | | | | | keeping track of those entries. llvm-svn: 200572
* typoAdrian Prantl2014-01-281-1/+1
| | | | llvm-svn: 200323
* Revert "Use DW_AT_high_pc and DW_AT_low_pc for the high and low pc for a"Eric Christopher2014-01-241-22/+11
| | | | | | | | in order to fix the cygwin/mingw bots. This reverts commit r199990. llvm-svn: 199991
* Use DW_AT_high_pc and DW_AT_low_pc for the high and low pc for aEric Christopher2014-01-241-11/+22
| | | | | | | | compile unit. Make these relocations on the platforms that need relocations and add a routine to ensure that we don't put the addresses in an offset table for split dwarf. llvm-svn: 199990
* Avoid emitting a DWARF type attribute for an ObjC property of typeEric Christopher2014-01-231-1/+2
| | | | | | | | void. Patch by Scott Talbot. llvm-svn: 199924
* Debug info (LTO): Move the creation of accessibility flags toAdrian Prantl2014-01-181-15/+16
| | | | | | | | | getOrCreateSubprogramDIE to avoid attributes being added twice when DIEs are merged. rdar://problem/15842330. llvm-svn: 199536
* Revert "Revert r198851, "Prototype of skeleton type units for fission""David Blaikie2014-01-101-1/+3
| | | | | | | | | This reverts commit r198865 which reverts r198851. ASan identified a use-of-uninitialized of the DwarfTypeUnit::Ty variable in skeleton type units. llvm-svn: 198908
* Revert r198851, "Prototype of skeleton type units for fission"NAKAMURA Takumi2014-01-091-3/+1
| | | | | | It caused undefined behavior. DwarfTypeUnit::Ty might not be initialized properly, I guess. llvm-svn: 198865
* Prototype of skeleton type units for fissionDavid Blaikie2014-01-091-1/+3
| | | | llvm-svn: 198851
* DwarfUnit: Rename "Node" to "CUNode" and propagate it through DwarfTypeUnit ↵David Blaikie2014-01-091-6/+5
| | | | | | | | | | as well. Since we'll now also need the split dwarf file name along with the language in DwarfTypeUnits, just use the whole DICompileUnit rather than explicitly handling each field needed. llvm-svn: 198842
* Revert "DwarfUnit: Move the DICompileUnit Node to the DwarfCompileUnit only"David Blaikie2014-01-091-6/+6
| | | | | | | | This reverts commit r198830. Decided to go a different way with this... llvm-svn: 198841
* DwarfUnit: Move the DICompileUnit Node to the DwarfCompileUnit onlyDavid Blaikie2014-01-091-6/+6
| | | | | | It's unused in DwarfTypeUnit, as is expected. llvm-svn: 198830
* Move the llvm mangler to lib/IR.Rafael Espindola2014-01-071-1/+1
| | | | | | This makes it available to tools that don't link with target (like llvm-ar). llvm-svn: 198708
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-071-2/+2
| | | | | | | | | | subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. llvm-svn: 198685
* Revert "Revert "Debug Info: Type Units: Simplify type hashing using ↵David Blaikie2014-01-031-40/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | IR-provided unique names."" This reverts commit r198398, thus reapplying r198397. I had accidentally introduced an endianness issue when applying the hash to the type unit. Using support::ulittle64_t in the reinterpret_cast in addDwarfTypeUnitType fixes this issue. Original commit message: Debug Info: Type Units: Simplify type hashing using IR-provided unique names. What's good for LTO metadata size problems ought to be good for non-LTO debug info size too, so let's rely on the same uniqueness in both cases. If it's insufficient for non-LTO for whatever reason (since we now won't be uniquing CU-local types or any C types - but these are likely to not be the most significant contributors to type bloat) we should consider a frontend solution that'll help both LTO and non-LTO alike, rather than using DWARF-level DIE-hashing that only helps non-LTO debug info size. It's also much simpler this way and benefits C++ even more since we can deduplicate lexically separate definitions of the same C++ type since they have the same mangled name. llvm-svn: 198436
* Revert "Debug Info: Type Units: Simplify type hashing using IR-provided ↵David Blaikie2014-01-031-7/+40
| | | | | | | | | | | unique names." Reverting due to bot failure I won't have time to investigate until tomorrow. This reverts commit r198397. llvm-svn: 198398
* Debug Info: Type Units: Simplify type hashing using IR-provided unique names.David Blaikie2014-01-031-40/+7
| | | | | | | | | | | | | | | | What's good for LTO metadata size problems ought to be good for non-LTO debug info size too, so let's rely on the same uniqueness in both cases. If it's insufficient for non-LTO for whatever reason (since we now won't be uniquing CU-local types or any C types - but these are likely to not be the most significant contributors to type bloat) we should consider a frontend solution that'll help both LTO and non-LTO alike, rather than using DWARF-level DIE-hashing that only helps non-LTO debug info size. It's also much simpler this way and benefits C++ even more since we can deduplicate lexically separate definitions of the same C++ type since they have the same mangled name. llvm-svn: 198397
* Revert "Reverting r193835 due to weirdness with Go..."David Blaikie2014-01-031-4/+8
| | | | | | | | | | The cgo problem was that it wants dwarf2 which doesn't support direct constant encoding of the location. So let's add support for dwarf2 encoding (using a location expression) of data member locations. This reverts commit r198385. llvm-svn: 198389
* Reverting r193835 due to weirdness with Go...David Blaikie2014-01-031-4/+5
| | | | | | | Apologies for the noise - we're seeing some Go failures with cgo interacting with Clang's debug info due to this change. llvm-svn: 198385
* Simplify conditional.Eric Christopher2014-01-021-1/+1
| | | | llvm-svn: 198350
* Revert "Debug info: Add enumerators to the __apple_names accelerator table."Adrian Prantl2014-01-021-3/+0
| | | | | | | This reverts r197927 until the discussion on llvm-commits comes to a conclusion. llvm-svn: 198333
* Refactor and reduce code duplication for non-split dwarf strings.Eric Christopher2013-12-301-18/+9
| | | | llvm-svn: 198233
* Revert r198208 and reapply:Eric Christopher2013-12-301-1/+1
| | | | | | | | | | r198196: Use a pointer to keep track of the skeleton unit for each normal unit and construct it up front. r198199: Reapply r198196 with a fix to zero initialize the skeleton pointer. r198202: Fix aranges and split dwarf by ensuring that the symbol and relocation back to the compile unit from the aranges section is to the skeleton unit and not the one in the dwo. with a fix to use integer 0 for DW_AT_low_pc since the relocation to the text section symbol was causing issues with COFF. Accordingly remove addLocalLabelAddress and machinery since we're not currently using it. llvm-svn: 198222
* Revert r198199 (and r198202). It broke 3 DebugInfo tests for targeting ↵NAKAMURA Takumi2013-12-301-18/+1
| | | | | | | | | | | | | | i686-cygming. r198196: Use a pointer to keep track of the skeleton unit for each normal unit and construct it up front. r198199: Reapply r198196 with a fix to zero initialize the skeleton pointer. r198202: Fix aranges and split dwarf by ensuring that the symbol and relocation back to the compile unit from the aranges section is to the skeleton unit and not the one in the dwo. They could be reproducible with explicit target. llvm/lib/MC/WinCOFFObjectWriter.cpp:224: bool {anonymous}::COFFSymbol::should_keep() const: Assertion `Section->Number != -1 && "Sections with relocations must be real!"' failed. llvm-svn: 198208
* Reapply r198196 with a fix to zero initialize the skeleton pointer.Eric Christopher2013-12-301-1/+18
| | | | llvm-svn: 198199
* Temporarily revert "Use a pointer to keep track of the skeleton unit forEric Christopher2013-12-301-17/+0
| | | | | | each normal unit" as it seems to be causing problems in the asan tests. llvm-svn: 198197
* Use a pointer to keep track of the skeleton unit for each normal unitEric Christopher2013-12-301-0/+17
| | | | | | | | | | | and construct it up front. Add address ranges at the end and a helper routine so that we're not needlessly using an indirction in the case of split dwarf. Update testcases according to the new ordering of attributes on the compile unit. llvm-svn: 198196
OpenPOWER on IntegriCloud