summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* PR14492: Debug Info: Support for values of non-integer non-type template ↵David Blaikie2013-05-101-2/+18
| | | | | | | | | | parameters. This is only tested for global variables at the moment (& includes tests for the unnamed parameter case, since apparently this entire function was completely untested previously) llvm-svn: 181632
* Revert "Make sure debug info contains linkage names (DW_AT_MIPS_linkage_name)"Eric Christopher2013-05-091-15/+11
| | | | | | | | temporarily while investigating gdb.cp/templates.exp. This reverts commit r181471. llvm-svn: 181496
* Make sure debug info contains linkage names (DW_AT_MIPS_linkage_name)Eric Christopher2013-05-081-11/+15
| | | | | | | | | for constructors and destructors since the original declaration given by the AT_specification both won't and can't. Patch by Yacine Belkadi, I've cleaned up the testcases. llvm-svn: 181471
* Pass the MDNode in and do the insertion at compile unit creation timeEric Christopher2013-05-081-2/+3
| | | | | | instead of relying upon an extra call to finish initializing. llvm-svn: 181383
* Update comment. Whitespace.Eric Christopher2013-04-221-2/+2
| | | | llvm-svn: 179999
* typoAdrian Prantl2013-04-041-1/+1
| | | | llvm-svn: 178804
* Debug Info: use DW_FORM_ref_addr instead of DW_FORM_ref4 if the referenced DIEManman Ren2013-03-121-1/+1
| | | | | | | | | | | | | | | | belongs to a different compile unit. DW_FORM_ref_addr should be used for cross compile-unit reference. When compiling a large application, we got a dwarfdump verification error where abstract_origin points to nowhere. This error can't be reproduced on any testing case in MultiSource. We may have other cases where we use DW_FORM_ref4 unconditionally. rdar://problem/13370501 llvm-svn: 176882
* Remove support for versioned debug info.David Blaikie2013-03-111-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | Versioned debug info support has been a burden to maintain & also compromised current debug info verification by causing test cases testing old debug info to remain rather than being updated to the latest. It also makes it hard to add or change the metadata schema by requiring various backwards-compatibility in the DI* hierarchy. So it's being removed in preparation for new changes to the schema to tidy up old/unnecessary fields and add new fields needed for new debug info (well, new to LLVM at least). The more surprising part of this is the changes to DI*::Verify - this became necessary due to the changes to AsmWriter. AsmWriter was relying on the version test to decide which bits of metadata were actually debug info when printing the comment annotations. Without the version information the tag numbers were too common & it would print debug info on random metadata that happened to start with an integer that matched a tag number. Instead this change makes the Verify functions more precise (just adding "number of operands" checks - not type checking those operands yet) & relies on that to decide which metadata is debug info metadata. llvm-svn: 176838
* Debug Info: store the files and directories for each compile unit.Manman Ren2013-03-071-6/+9
| | | | | | | | | | | | | | We now emit a line table for each compile unit. To reduce the prologue size of each line table, the files and directories used by each compile unit are stored in std::map<unsigned, std::vector< > > instead of std::vector< >. The prologue for a lto'ed image can be as big as 93K. Duplicating 93K for each compile unit causes a huge increase of debug info. With this patch, each prologue will only emit the files required by the compile unit. rdar://problem/13342023 llvm-svn: 176605
* Remove unnecessary check against isGlobalVariable. We check itEric Christopher2013-02-271-1/+1
| | | | | | a few lines above. llvm-svn: 176224
* Rework comment slightly and fix a few typos.Eric Christopher2013-02-271-8/+5
| | | | llvm-svn: 176223
* Debug Info: for static member variables, always put AT_MIPS_linkage_name to theManman Ren2013-02-271-5/+12
| | | | | | | | | | | | definition DIE (TAG_variable), and put AT_MIPS_linkage_name to TAG_member when DarwinGDBCompat is true. Darwin GDB needs AT_MIPS_linkage_name at both places to work. Follow-up patch to r176143. rdar://problem/13291234 llvm-svn: 176220
* Debug Info: for static member variables, add AT_MIPS_linkage_name to theManman Ren2013-02-271-1/+7
| | | | | | | | | | | | definition DIE, to make old GDB happy. We have a regression for old GDB when Clang uses DW_TAG_member to declare static members inside a class, instead of DW_TAG_variable. This patch will fix this regression. rdar://problem/13291234 llvm-svn: 176143
* Revert r176120 as it caused a failure at static-member.cppManman Ren2013-02-261-4/+1
| | | | llvm-svn: 176129
* Debug Info: for static member variables, move AT_MIPS_linkage_name fromManman Ren2013-02-261-1/+4
| | | | | | | | | | | TAG_member inside a class to the specification DIE. Having AT_MIPS_linkage_name on TAG_member caused old gdb (GNU 6.3.50) to error out. Also gcc 4.7 has AT_MIPS_linkage_name on the specification DIE. rdar://problem/13291234 llvm-svn: 176120
* Allow optionally generating pubnames section in DWARF info. IntroduceKrzysztof Parzyszek2013-02-121-1/+3
| | | | | | option "generate-dwarf-pubnames" to control it, set to "false" by default. llvm-svn: 174981
* [Dwarf] avoid emitting multiple AT_const_value for static memebers.Manman Ren2013-02-011-3/+9
| | | | | | | | Testing case is reduced from MultiSource/BenchMarks/Prolangs-C++/deriv1. rdar://problem/13071590 llvm-svn: 174235
* Support artificial parameters in function types.David Blaikie2013-01-291-0/+2
| | | | | | | Provides the functionality for Clang change r172911 - I just had this still lying around. llvm-svn: 173820
* The last of PR14471 - emission of constant floatsDavid Blaikie2013-01-201-4/+16
| | | | llvm-svn: 172941
* Split out DW_OP_addr for the split debug info DWARF5 proposal.Eric Christopher2013-01-181-6/+18
| | | | llvm-svn: 172857
* Define metadata interfaces for describing a static data memberEric Christopher2013-01-161-43/+94
| | | | | | | | | | | of a class. Emit static data member declarations and definitions through correctly. Part of PR14471. Patch by Paul Robinson! llvm-svn: 172590
* Split address information for DWARF5 split dwarf proposal. This involvesEric Christopher2013-01-151-0/+20
| | | | | | | | | | | | | | | using the DW_FORM_GNU_addr_index and a separate .debug_addr section which stays in the executable and is fully linked. Sneak in two other small changes: a) Print out the debug_str_offsets.dwo section. b) Change form we're expecting the entries in the debug_str_offsets.dwo section to take from ULEB128 to U32. Add tests for all of this in the fission-cu.ll test. llvm-svn: 172578
* Remove the llvm-local DW_TAG_vector_type tag and add a test toEric Christopher2013-01-081-2/+1
| | | | | | make sure that vector types do work. llvm-svn: 171833
* Add more comments to what's going on here.Eric Christopher2013-01-071-1/+3
| | | | llvm-svn: 171780
* Add support for separating strings for the split debug info DWARF5Eric Christopher2013-01-071-0/+21
| | | | | | | | | | | | | proposal. This leaves the strings in the skeleton die as strp, but in all dwo files they're accessed now via DW_FORM_GNU_str_index. Add support for dumping these sections and modify the fission-cu.ll testcase to have the correct strings and form. Fix a small bug in the fixed form sizes routine that involved out of array accesses for the table and add a FIXME in the extractFast routine to fix this up. llvm-svn: 171779
* PR14759: Debug info support for C++ member pointers.David Blaikie2013-01-071-0/+3
| | | | | | | | This works fine with GDB for member variable pointers, but GDB's support for member function pointers seems to be quite unrelated to DW_TAG_ptr_to_member_type. (see GDB bug 14998 for details) llvm-svn: 171698
* Emit DW_TAG_formal_parameter for unnamed parameters.David Blaikie2013-01-051-2/+0
| | | | | | | | | | This change essentially reverts r87069 which came without a test case. It causes no regressions in the GDB 7.5 test suite & fixes 25 xfails (commit to the test suite to follow). If anyone can present a test case that demonstrates why this check is necessary I'd be happy to account for it in one way or another. llvm-svn: 171609
* Add a name for the anonymous type we're creating for subrangeEric Christopher2013-01-041-0/+3
| | | | | | | | types and a FIXME for what we should be doing. Should solve the immediacy of PR12069 where our debug info is crashing another tool. llvm-svn: 171536
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-4/+4
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Start splitting out the debug string section handling by moving itEric Christopher2012-12-201-4/+5
| | | | | | into the DwarfUnits class. llvm-svn: 170770
* Debug Info: add support to mark member variables as artificialDavid Blaikie2012-12-131-0/+3
| | | | | | This is the LLVM portion of r170154. llvm-svn: 170156
* s/getLowerBoundDefault/getDefaultLowerBound/ for consistency. Also put the ↵Bill Wendling2012-12-061-4/+4
| | | | | | more natural check first in the if-then statement. llvm-svn: 169486
* Handle non-default array bounds.Bill Wendling2012-12-061-13/+57
| | | | | | | | | Some languages, e.g. Ada and Pascal, allow you to specify that the array bounds are different from the default (1 in these cases). If we have a lower bound that's non-default, then we emit the lower bound. We also calculate the correct upper bound in those cases. llvm-svn: 169484
* Use the 'count' attribute to calculate the upper bound of an array.Bill Wendling2012-12-041-13/+14
| | | | | | | | | The count attribute is more accurate with regards to the size of an array. It also obviates the upper bound attribute in the subrange. We can also better handle an unbound array by setting the count to -1 instead of the lower bound to 1 and upper bound to 0. llvm-svn: 169312
* Add a 'count' field to the DWARF subrange.Bill Wendling2012-12-041-1/+3
| | | | | | | | | The count field is necessary because there isn't a difference between the 'lo' and 'hi' attributes for a one-element array and a zero-element array. When the count is '0', we know that this is a zero-element array. When it's >=1, then it's a normal constant sized array. When it's -1, then the array is unbounded. llvm-svn: 169218
* Fix PR12942: Allow two CUs to be generated from the same source file.Eli Bendersky2012-12-031-2/+2
| | | | | | Thanks Eric for the review. llvm-svn: 169142
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-4/+4
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Whitespace.Eric Christopher2012-11-211-29/+29
| | | | llvm-svn: 168402
* Update for some of the coding standard before rearranging functionsEric Christopher2012-11-211-6/+6
| | | | | | around. llvm-svn: 168401
* Revert "Use the 'count' attribute instead of the 'upper_bound' attribute."Eric Christopher2012-11-131-2/+1
| | | | | | | | temporarily as it is breaking the gdb bots. This reverts commit r167806/e7ff4c14b157746b3e0228d2dce9f70712d1c126. llvm-svn: 167886
* Use the 'count' attribute instead of the 'upper_bound' attribute.Bill Wendling2012-11-131-1/+2
| | | | | | | | | If we have a type 'int a[1]' and a type 'int b[0]', the generated DWARF is the same for both of them because we use the 'upper_bound' attribute. Instead use the 'count' attrbute, which gives the correct number of elements in the array. <rdar://problem/12566646> llvm-svn: 167806
* Move TargetData to DataLayout.Micah Villmow2012-10-081-5/+5
| | | | llvm-svn: 165402
* Only emit DW_AT_object_pointer if this is a definition.Eric Christopher2012-09-201-3/+0
| | | | llvm-svn: 164326
* Recommit, with fixes:Eric Christopher2012-09-121-0/+3
| | | | | | | | | | | Add some support for dealing with an object pointer on arguments. Part of rdar://9797999 which now supports adding the object pointer attribute to the subprogram as it should. llvm-svn: 163754
* Revert "Add some support for dealing with an object pointer on arguments."Eric Christopher2012-09-121-4/+0
| | | | | | This should be done on the subprogram, not the variable itself. llvm-svn: 163734
* Add some support for dealing with an object pointer on arguments.Eric Christopher2012-09-121-0/+4
| | | | | | Part of rdar://9797999 llvm-svn: 163667
* No reason to construct this twice.Eric Christopher2012-09-101-1/+1
| | | | llvm-svn: 163567
* Use DW_FORM_flag_present to save space in debug information if we'reEric Christopher2012-08-241-20/+26
| | | | | | | | not in darwin gdb compat mode. Fixes rdar://10975088 llvm-svn: 162526
* Remove the DW_AT_MIPS_linkage name attribute when we don't need itEric Christopher2012-08-231-1/+8
| | | | | | | | | | | output (we're emitting a specification already and the information isn't changing) and we're not in old gdb compat mode. Saves 1% on the debug information for a build of llvm. Fixes rdar://11043421 llvm-svn: 162493
* Grammar.Eric Christopher2012-08-141-1/+1
| | | | llvm-svn: 161851
OpenPOWER on IntegriCloud