summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Added support for generate DWARF .debug_aranges sections automatically.Richard Mitton2013-09-191-0/+14
| | | | llvm-svn: 191052
* Debug Info: move DIScope::getContext back from DwarfDebug.Manman Ren2013-09-091-1/+1
| | | | | | | | This partially reverts r190330. DIScope::getContext now returns DIScopeRef instead of DIScope. We construct a DIScopeRef from DIScope when we are dealing with subprogram, lexical block or name space. llvm-svn: 190362
* Debug Info: Use DIScopeRef for DIType::getContext.Manman Ren2013-09-091-5/+5
| | | | | | | | | | | | | | | | | In DIBuilder, the context field of a TAG_member is updated to use the scope reference. Verifier is updated accordingly. DebugInfoFinder now needs to generate a type identifier map to have access to the actual scope. Same applies for BreakpointPrinter. processModule of DebugInfoFinder is called during initialization phase of the verifier to make sure the type identifier map is constructed early enough. We are now able to unique a simple class as demonstrated by the added testing case. llvm-svn: 190334
* Debug Info: move DIScope::getContext to DwarfDebug.Manman Ren2013-09-091-5/+5
| | | | | | | | | | | | DIScope::getContext is a wrapper function that calls the specific getContext method on each subclass. When we switch DIType::getContext to return DIScopeRef instead of DIScope, DIScope::getContext can no longer return a DIScope without a type identifier map. DIScope::getContext is only used by DwarfDebug, so we move it to DwarfDebug to have easy access to the type identifier map. llvm-svn: 190330
* Debug Info: Move isSubprogramContext from DebugInfo to DwarfDebug.Manman Ren2013-09-091-1/+1
| | | | | | | | | | This helper function needs the type identifier map when we switch DIType::getContext to return DIScopeRef instead of DIScope. Since isSubprogramContext is used by DwarfDebug only, We move it to DwarfDebug to have easy access to the map. llvm-svn: 190325
* Debug Info: Use identifier to reference DIType in containing type field ofManman Ren2013-09-071-1/+1
| | | | | | | | a DISubprogram. Verifier is updated accordingly. llvm-svn: 190229
* Debug Info: Use identifier to reference DIType in containing type field ofManman Ren2013-09-061-1/+1
| | | | | | | | a DICompositeType. Verifier is updated accordingly. llvm-svn: 190190
* Debug Info: Use identifier to reference DIType in base type field ofManman Ren2013-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | ptr_to_member. We introduce a new class DITypeRef that represents a reference to a DIType. It wraps around a Value*, which can be either an identifier in MDString or an actual MDNode. The class has a helper function "resolve" that finds the actual MDNode for a given DITypeRef. We specialize getFieldAs to return a field that is a reference to a DIType. To correctly access the base type field of ptr_to_member, getClassType now calls getFieldAs<DITypeRef> to return a DITypeRef. Also add a typedef for DITypeIdentifierMap and a helper generateDITypeIdentifierMap in DebugInfo.h. In DwarfDebug.cpp, we keep a DITypeIdentifierMap and call generateDITypeIdentifierMap to actually populate the map. Verifier is updated accordingly. llvm-svn: 190081
* Move accelerator table defines and constants to Dwarf.h sinceEric Christopher2013-09-051-2/+1
| | | | | | | | we're proposing it for DWARF5. No functional change intended. llvm-svn: 190074
* Revert "Revert "Remove the darwin gdb option, that version of gdb is now ↵Michael Gottesman2013-09-041-21/+5
| | | | | | | | | | | | | | dead and the rest of the compatibility should be done on a dwarf-N level."" This reverts commit r189913. Talked with Eric on IRC. I am going to XFAIL the failing test since it is using what Eric described as "the member hack" which was needed on that old GDB. Sorry for the noise! llvm-svn: 189914
* Revert "Remove the darwin gdb option, that version of gdb is now dead and ↵Michael Gottesman2013-09-041-5/+21
| | | | | | | | | | | | the rest of the compatibility should be done on a dwarf-N level." This reverts commit r189903. This commit broke the phase 1 buildbot for a while. http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/6684 llvm-svn: 189913
* Remove the darwin gdb option, that version of gdb is now dead andEric Christopher2013-09-041-21/+5
| | | | | | the rest of the compatibility should be done on a dwarf-N level. llvm-svn: 189903
* Use DW_FORM_sdata for signed constant values and udata on occasionEric Christopher2013-08-271-22/+53
| | | | | | | | | | when we can. Migrate from using blocks when we're adding just a single attribute and floating point values are an unsigned, not signed, bag of bits. Update all test cases accordingly. llvm-svn: 189419
* Remove the language parameter and variable from the compile unit. WeEric Christopher2013-08-261-5/+7
| | | | | | can get it via the MDNode that's passed in. Save that instead. llvm-svn: 189291
* DebugInfo: don't emit zero-length names for parametersDavid Blaikie2013-08-191-1/+2
| | | | | | | | We check this in many/all other cases, just missed this one it seems. Perhaps it'd be worth unifying this so we never emit zero-length DW_AT_names. llvm-svn: 188649
* DebugInfo: Allow the addition of other (such as static data) members to a ↵David Blaikie2013-08-161-3/+0
| | | | | | | | record type after construction Plus a type cleanup & minor fix to enumerate members of declarations. llvm-svn: 188577
* For DW_TAG_template_type_parameter the actual passed in type couldEric Christopher2013-08-081-1/+3
| | | | | | | be void and therefore not have a type entry. Only add the type if it is non-void and provide a testcase. llvm-svn: 187966
* The conversion to bool is fine here, no need to check isType.Eric Christopher2013-08-081-1/+1
| | | | llvm-svn: 187964
* Make sure that if we're going to attempt to add a type to a DIE thatEric Christopher2013-08-081-10/+16
| | | | | | | | | | | | the type exists. Fix up cases where we weren't checking for optional types and add an assert to addType to make sure we catch this in the future. Fix up a testcase that was using the tag for DW_TAG_array_type when it meant DW_TAG_enumeration_type. llvm-svn: 187963
* Change variable name and reflow formatting.Eric Christopher2013-08-081-10/+10
| | | | llvm-svn: 187962
* Be more rigorous about the sizes of forms and attributes.Eric Christopher2013-08-081-25/+25
| | | | llvm-svn: 187953
* DebugInfo: Emit definitions for types with no members.David Blaikie2013-08-011-7/+3
| | | | | | The absence of members was a poor/incorrect proxy for "is definition". llvm-svn: 187607
* Add preliminary support for hashing DIEs and breaking them intoEric Christopher2013-07-261-4/+44
| | | | | | | | | | | | | | | | type units. Initially this support is used in the computation of an ODR checker for C++. For now we're attaching it to the DIE, but in the future it will be attached to the type unit. This also starts breaking out types into the separation for type units, but without actually splitting the DIEs. In preparation for hashing the DIEs this adds a DIEString type that contains a StringRef with the string contained at the label. llvm-svn: 187213
* 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
OpenPOWER on IntegriCloud