summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Collapse temporary variable into call.Eric Christopher2013-07-141-4/+2
| | | | llvm-svn: 186295
* Fix comment.Eric Christopher2013-07-091-1/+1
| | | | llvm-svn: 185984
* Typo.Adrian Prantl2013-07-091-1/+1
| | | | llvm-svn: 185971
* Reapply an improved version of r180816/180817.Adrian Prantl2013-07-091-2/+3
| | | | | | | | | | | | | | | Change the informal convention of DBG_VALUE machine instructions so that we can express a register-indirect address with an offset of 0. The old convention was that a DBG_VALUE is a register-indirect value if the offset (operand 1) is nonzero. The new convention is that a DBG_VALUE is register-indirect if the first operand is a register and the second operand is an immediate. For plain register values the combination reg, reg is used. MachineInstrBuilder::BuildMI knows how to build the new DBG_VALUES. rdar://problem/13658587 llvm-svn: 185966
* Debug Info: clean up usage of Verify.Manman Ren2013-07-081-10/+10
| | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. llvm-svn: 185847
* addConstantValue, addConstantFPValue never returned anything butEric Christopher2013-07-031-25/+13
| | | | | | true, so remove the return value and propagate accordingly. llvm-svn: 185490
* [DebugInfo] Allow getDebugThreadLocalSymbol to return MCExprUlrich Weigand2013-07-021-3/+3
| | | | | | | | | | | This allows getDebugThreadLocalSymbol to return a generic MCExpr instead of just a MCSymbolRefExpr. This is in preparation for supporting debug info for TLS variables on PowerPC, where we need to describe the variable location using a more complex expression than just MCSymbolRefExpr. llvm-svn: 185460
* [DebugInfo] Introduce DIEExpr variant of DIEValue to hold MCExpr valuesUlrich Weigand2013-07-021-9/+12
| | | | | | | | | | | | This partially reverts r185202 and restores DIELabel to hold plain MCSymbol references. Instead, we add a new subclass DIEExpr of DIEValue that can hold generic MCExpr references. This is in preparation for supporting debug info for TLS variables on PowerPC, where we need to describe the variable location using a more complex expression than just MCSymbolRefExpr. llvm-svn: 185458
* PR14728: DebugInfo: TLS variables with -gsplit-dwarfDavid Blaikie2013-07-011-10/+13
| | | | llvm-svn: 185398
* DebugInfo: PR14728: TLS supportDavid Blaikie2013-06-281-3/+18
| | | | | | | | | | | | | | Based on GCC's output for TLS variables (OP_constNu, x@dtpoff, OP_lo_user), this implements debug info support for TLS in ELF. Verified that this output is correct/sufficient on Linux (using gold - if you're using binutils-ld, you'll need something with the fix for http://sourceware.org/bugzilla/show_bug.cgi?id=15685 in it). Support on non-ELF is sort of "arbitrary" at the moment - if Apple folks want to discuss (or just go ahead & implement) how this should work in MachO, etc, I'm open. llvm-svn: 185203
* DebugInfo: Pass MCSymbolRefExprs for labels instead of MCSymbolsDavid Blaikie2013-06-281-5/+10
| | | | | | | This is a precursor to adding debug info support for TLS which requires non-default relocations applied to TLS symbols. llvm-svn: 185202
* Formatting.Eric Christopher2013-06-241-3/+2
| | | | llvm-svn: 184788
* Use const references instead of pointers to references that areEric Christopher2013-06-241-17/+18
| | | | | | never modified. No functional change. llvm-svn: 184781
* DebugInfo: Support (using GNU extensions) for template template parameters ↵David Blaikie2013-06-221-2/+11
| | | | | | and parameter packs llvm-svn: 184643
* DebugInfo: don't use location lists when the location covers the whole ↵David Blaikie2013-06-201-4/+9
| | | | | | | | | | | | | function anyway Fix up three tests - one that was relying on abbreviation number, another relying on a location list in this case (& testing raw asm, changed that to use dwarfdump on the debug_info now that that's where the location is), and another which was added in r184368 - exposing a bug in that fix that is exposed when we emit the location inline rather than through a location list. Fix that bug while I'm here. llvm-svn: 184387
* Debug Info: Simplify Frame Index handling in DBG_VALUE Machine InstructionsDavid Blaikie2013-06-161-36/+16
| | | | | | | | | | | | | | | | | | | | Rather than using the full power of target-specific addressing modes in DBG_VALUEs with Frame Indicies, simply use Frame Index + Offset. This reduces the complexity of debug info handling down to two representations of values (reg+offset and frame index+offset) rather than three or four. Ideally we could ensure that frame indicies had been eliminated by the time we reached an assembly or dwarf generation, but I haven't spent the time to figure out where the FIs are leaking through into that & whether there's a good place to convert them. Some FI+offset=>reg+offset conversion is done (see PrologEpilogInserter, for example) which is necessary for some SelectionDAG assumptions about registers, I believe, but it might be possible to make this a more thorough conversion & ensure there are no remaining FIs no matter how instruction selection is performed. llvm-svn: 184066
* Move getRealLinkageName to a common place and remove all the duplicates of it.Benjamin Kramer2013-06-011-14/+4
| | | | | | Also simplify code a bit while there. No functionality change. llvm-svn: 183076
* Formatting.Eric Christopher2013-05-301-1/+1
| | | | llvm-svn: 182902
* LTO+Debug Info: revert r182791.Manman Ren2013-05-291-7/+2
| | | | | | | | | | | | Since the testing case uses ref_addr, which requires version 3+ to work, we will solve the dwarf version issue first. This patch also causes failures in one of the bots. I will update the patch accordingly in my next attempt. rdar://13926659 llvm-svn: 182867
* LTO+Debug Info: correctly emit inlined_subroutine when the inlined callee isManman Ren2013-05-281-2/+7
| | | | | | | | | | | | from a different CU. We used to print out an error message and fail to generate inlined_subroutine. If we use ref_addr in the generated DWARF, the DWARF version should be 3 or above. rdar://13926659 llvm-svn: 182791
* Solidify the assumption that a DW_TAG_subprogram's type is a ↵David Blaikie2013-05-221-19/+12
| | | | | | | | | | | | | DW_TAG_subroutine_type There were bits & pieces of code lying around that may've given the impression that debug info metadata supported the possibility that a subprogram's type could be specified by a non-subroutine type describing the return type of a void function. This support was incomplete & unnecessary. Asserts & API have been changed to make the desired usage more clear. llvm-svn: 182532
* 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
OpenPOWER on IntegriCloud