summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Formatting fixups.Eric Christopher2014-02-261-2/+2
| | | | llvm-svn: 202220
* DwarfDebug: Avoid emitting an empty debug_aranges section when aranges are ↵David Blaikie2014-02-251-1/+2
| | | | | | disabled llvm-svn: 202201
* Address review comments for r202188.Adrian Prantl2014-02-251-18/+2
| | | | | | | | | 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-8/+24
| | | | | | | | | | | | | | 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-11/+1
| | | | | | This reverts commit r202184 because of buildbot breakage. llvm-svn: 202187
* Debug info: Support variadic functions.Adrian Prantl2014-02-251-1/+11
| | | | | | | | | | | | 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
* Move get[S|U]LEB128Size() to LEB128.h.Logan Chien2014-02-221-1/+2
| | | | | | | | | | This commit moves getSLEB128Size() and getULEB128Size() from MCAsmInfo to LEB128.h and removes some copy-and-paste code. Besides, this commit also adds some unit tests for the LEB128 functions. llvm-svn: 201937
* DebugInfo: Remove the empty macinfo section.David Blaikie2014-02-211-3/+0
| | | | | | | | | | | We were just emitting a label for this section for no real reason - this caused us to emit the section even though we never put anything in it. Not bothering with a test (though not adamantly anti-test) because it seems somewhat arbitrary to test for the absence of this section anymore than the absence of any other section. llvm-svn: 201876
* Add support for hashing attributes with DW_FORM_block. This requiredEric Christopher2014-02-201-1/+1
| | | | | | | | | | | | | passing down an AsmPrinter instance so we could compute the size of the block which could be target specific. All of the test cases in the unittest don't have any target specific data so we can use a NULL AsmPrinter there. This also depends upon block data being added as integers. We can now hash the entire fission-cu.ll compile unit so turn the flag on there with the hash value. llvm-svn: 201752
* DebugInfo: Deduplicate entries in the fission address tableDavid Blaikie2014-02-151-11/+9
| | | | | | | | | | | | 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
* DwarfDebug: Remove dead code.David Blaikie2014-02-151-7/+3
| | | | llvm-svn: 201467
* DebugInfo: Implement DW_AT_stmt_list for type unitsDavid Blaikie2014-02-141-2/+7
| | | | | | | | | 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: Refactor out DW_AT_stmt_list creation into common function for ↵David Blaikie2014-02-141-30/+2
| | | | | | | | | | | | | | | 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
* DebugInfo: Don't include the name of the CU file in the line table file list ↵David Blaikie2014-02-141-3/+0
| | | | | | | | | | | | | | | | | | | | when it's unneeded Recommitting r201380 (reverted in r201389) Recommitting r201351 and r201355 (reverted in r201351 and r201355) We weren't emitting the an empty (header only) line table when the line table was empty - this made the DWARF invalid (the compile unit would point to the zero-size debug_lines section where there should've been an empty line table but there was nothing at all). Fix that, and as a consequence this works around/addresses PR18809. Also, we emit a non-empty line table to workaround a darwin linker bug, so XFAILing on darwin too. Also, mark the test as 'REQUIRES: object-emission' because it does. llvm-svn: 201429
* Revert "DebugInfo: Don't include the name of the CU file in the line table ↵Eric Christopher2014-02-141-0/+3
| | | | | | | | file list when it's unneeded" This reverts commit r201380 for now while we investigate. llvm-svn: 201389
* DebugInfo: Don't include the name of the CU file in the line table file list ↵David Blaikie2014-02-141-3/+0
| | | | | | | | | | | | | | when it's unneeded Recommitting r201351 and r201355 (reverted in r201351 and r201355) We weren't emitting the an empty (header only) line table when the line table was empty - this made the DWARF invalid (the compile unit would point to the zero-size debug_lines section where there should've been an empty line table but there was nothing at all). Fix that, and as a consequence this works around/addresses PR18809. llvm-svn: 201380
* Disable emission of aranges by default and add a command lineEric Christopher2014-02-141-1/+7
| | | | | | | option to enable again that will be matched with a commit to enable in clang. llvm-svn: 201378
* [PR18809] Revert r201187, "DebugInfo: Don't include the name of the CU file ↵NAKAMURA Takumi2014-02-131-0/+3
| | | | | | | | in the line table file list when it's unneeded" It really crashes cygwin's stage2 configure with "clang -g". llvm-svn: 201351
* Fix some formatting in my last commit (r201196)David Blaikie2014-02-121-4/+4
| | | | llvm-svn: 201197
* DwarfUnit: Provide a reference to a defining DwarfCompileUnit from ↵David Blaikie2014-02-121-8/+8
| | | | | | | | | 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
* DebugInfo: Don't include the name of the CU file in the line table file list ↵David Blaikie2014-02-111-3/+0
| | | | | | | | | | when it's unneeded This comes up in empty files or files containing #file directives that never reference the actual source file name. Came up in a small test of line tables I was playing with. llvm-svn: 201187
* DebugInfo: Use existing symbol rather than creating it again.David Blaikie2014-02-111-1/+1
| | | | llvm-svn: 201119
* Remove some prototype code accidentally committed in r201043David Blaikie2014-02-101-1/+0
| | | | | | Thanks to Chandler for the catch. llvm-svn: 201095
* Fix formatting introduced in r200941David Blaikie2014-02-091-0/+1
| | | | llvm-svn: 201043
* Remove support for not using .loc directives.Rafael Espindola2014-02-051-7/+6
| | | | | | Clang itself was not using this. The only way to access it was via llc. llvm-svn: 200862
* DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer ↵David Blaikie2014-02-041-4/+2
| | | | | | | | | | | 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
* DebugInfo: Flag type unit references as declarationsDavid Blaikie2014-01-311-0/+5
| | | | | | | | | This ensures DWARF consumers don't confuse these references for definitions. I'd argue it might be nice to improve debuggers so we don't need this, but it's just one field in an abbreviation anyway - so it doesn't seem worth the fight. llvm-svn: 200569
* Reland r200340 - 'Add line table debug info to COFF files when using a win32 ↵Timur Iskhodzhanov2014-01-301-25/+1
| | | | | | | | triple' This incorporates a couple of fixes reviewed at http://llvm-reviews.chandlerc.com/D2651 llvm-svn: 200440
* Move range handling for a function to endFunction rather thanEric Christopher2014-01-291-5/+5
| | | | | | when we create the subprogram DIE. llvm-svn: 200426
* If we use DW_AT_ranges we need to specify a base address that rangesEric Christopher2014-01-291-2/+8
| | | | | | | | are relative to in the compile unit. Currently let's just use 0... Thanks to Greg Clayton for the catch! llvm-svn: 200425
* Turn on CU ranges if we've got multiple compile units in the sameEric Christopher2014-01-291-4/+6
| | | | | | | | module since there's no range guarantee that we could make given output order. This also fixes up the testcases that have multiple CUs to have the correct range offset. llvm-svn: 200422
* Make the compile unit map a MapVector so that we can assume a stableEric Christopher2014-01-291-2/+3
| | | | | | output ordering. llvm-svn: 200421
* Fix formatting of comment.Eric Christopher2014-01-291-4/+2
| | | | llvm-svn: 200420
* Revert r200340, "Add line table debug info to COFF files when using a win32 ↵NAKAMURA Takumi2014-01-291-1/+25
| | | | | | | | triple." It was incompatible with --target=i686-win32. llvm-svn: 200375
* Add line table debug info to COFF files when using a win32 triple.Timur Iskhodzhanov2014-01-281-25/+1
| | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D2232 llvm-svn: 200340
* Revert r199871 and replace it with a simple check in the debug infoEric Christopher2014-01-281-1/+8
| | | | | | | | | code to see if we're emitting a function into a non-default text section. This is still a less-than-ideal solution, but more contained than r199871 to determine whether or not we're emitting code into an array of comdat sections. llvm-svn: 200269
* Reformat slightly.Eric Christopher2014-01-271-5/+1
| | | | llvm-svn: 200264
* Revert "Use DW_AT_high_pc and DW_AT_low_pc for the high and low pc for a"Eric Christopher2014-01-241-13/+3
| | | | | | | | 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-3/+13
| | | | | | | | 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
* Make the use of DW_AT_ranges in the compile unit depend also uponEric Christopher2014-01-231-5/+8
| | | | | | the existence of comdat/special sections. llvm-svn: 199954
* Fix a DenseMap iterator invalidation bug causing lots of crashes whenChandler Carruth2014-01-201-31/+35
| | | | | | | | | | | | | | | | | | | type units were enabled. The crux of the issue is that the addDwarfTypeUnitType routine can end up being indirectly recursive. In this case, the reference into the dense map (TU) became invalid by the time we popped all the way back and used it to add the DIE type signature. Instead, use early return in the case where we can bypass the recursive step and creating a type unit. Then use the pointer to the new type unit to set up the DIE type signature in the case where we have to. I tried really hard to reduce a testcase for this, but it's really annoying. You have to get this to be mid-recursion when the densemap grows. Even if we got a test case for this today, it'd be very unlikely to continue exercising this pattern. llvm-svn: 199630
* Make sure we emit a relocation to the debug_ranges section in theEric Christopher2014-01-151-3/+6
| | | | | | presence of CU ranges. llvm-svn: 199276
* Enable use of ranges for translation units in the presence ofEric Christopher2014-01-141-5/+7
| | | | | | | -ffunction-sections and update comments and TODOs about other places that we should enable this. llvm-svn: 199263
* Revert r198979 - accidental commit.Eric Christopher2014-01-111-5/+5
| | | | llvm-svn: 198981
* Reformat.Eric Christopher2014-01-111-5/+3
| | | | llvm-svn: 198980
* Update function name and add some helpful comments.Eric Christopher2014-01-111-3/+4
| | | | llvm-svn: 198979
* Revert "Revert r198851, "Prototype of skeleton type units for fission""David Blaikie2014-01-101-3/+20
| | | | | | | | | 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-19/+3
| | | | | | 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-3/+19
| | | | llvm-svn: 198851
* DwarfDebug: Refactor out common skeleton construction code to be reused for ↵David Blaikie2014-01-091-17/+22
| | | | | | type unit skeletons. llvm-svn: 198846
OpenPOWER on IntegriCloud