summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Debug Info: clean up usage of Verify.Manman Ren2013-07-021-14/+14
| | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. llvm-svn: 185463
* Use the zero-argument DIBuilder::createNullPtrType in Clang.Peter Collingbourne2013-06-271-2/+1
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1051 llvm-svn: 185115
* Rewrite record layout for ms_struct structs.Eli Friedman2013-06-261-11/+0
| | | | | | | | | | | | | | The old implementation of ms_struct in RecordLayoutBuilder was a complete mess: it depended on complicated conditionals which didn't really reflect the underlying logic, and placed a burden on users of the resulting RecordLayout. This commit rips out almost all of the old code, and replaces it with simple checks in RecordLayoutBuilder::LayoutBitField. This commit also fixes <rdar://problem/14252115>, a bug where class inheritance would cause us to lay out bitfields incorrectly. llvm-svn: 185018
* [AST] Introduce a new DecayedType sugar nodeReid Kleckner2013-06-241-0/+4
| | | | | | | | | | | | | | The goal of this sugar node is to be able to look at an arbitrary FunctionType and tell if any of the parameters were decayed from an array or function type. Ultimately this is necessary to implement Microsoft's C++ name mangling scheme, which mangles decayed arrays differently from normal pointers. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1014 llvm-svn: 184763
* DebugInfo: ensure negative enumerators are emitted as suchDavid Blaikie2013-06-241-1/+1
| | | | | | | | | | There's still a problem here - since we're not appropriately using the signedness/range of the enum to chooset the encoding and emission of enumerators, but GCC has some bugs around this too so I assume that's not /such/ a high priority though I may get to it soon out of completeness. llvm-svn: 184695
* DebugInfo: Support (using GNU extensions) for template template parameters ↵David Blaikie2013-06-221-16/+26
| | | | | | and parameter packs llvm-svn: 184644
* DebugInfo: Random tidying up/simplificationDavid Blaikie2013-06-221-24/+16
| | | | | | No functionality change intended. llvm-svn: 184614
* PR16214: Debug info for types first used via pointers or qualified types & ↵David Blaikie2013-06-211-1/+8
| | | | | | later require definitions llvm-svn: 184594
* Fix all the silly things I committed in r184509David Blaikie2013-06-211-2/+3
| | | | llvm-svn: 184512
* Alternative fix for r184473.David Blaikie2013-06-211-26/+13
| | | | | | | | | | | This just seems a bit tidier/more principled. Based on a patch provided by Adrian - with the only minor tweak that it needed to use "getTypeOrNull" rather than "getCompletedTypeOrNull" since we don't store declarations in the CompletedTypes cache. No intended functionality change. llvm-svn: 184509
* Debug Info: Attempt to resolve forward declarations if we are not emittingAdrian Prantl2013-06-201-2/+27
| | | | | | | | | | limited debug info. This is another small addendum to r184252. rdar://problem/14101097 llvm-svn: 184473
* Debug Info: PR14763/r183329 - specify that non-trivial pass-by-value ↵David Blaikie2013-06-191-0/+3
| | | | | | | | | | parameters are stored indirectly This is to fix the location information for such parameters to refer to the object accessible through the pointer rather than to the pointer parameter itself. llvm-svn: 184367
* Add some comments to r184252.Adrian Prantl2013-06-181-0/+5
| | | | | | rdar://problem/14101097 llvm-svn: 184259
* Emit forward decls for structs with declarations only when we areAdrian Prantl2013-06-181-1/+1
| | | | | | | | | | limiting debug info. FIXME: There is still work left to do here, the testcase should work even with -flimit-debug-info. rdar://problem/14101097 llvm-svn: 184252
* 80-column fixup after recent change to getOrCreateType.Eric Christopher2013-06-071-15/+20
| | | | llvm-svn: 183586
* address some comments on r183474:Adrian Prantl2013-06-071-6/+1
| | | | | | | | | | - factor the name construction part out from constructSetterName - rename constructSetterName to the more appropriate constructSetterSelector no functionality change intended. rdar://problem/14035789 llvm-svn: 183582
* documentation: remove confusing reference to properties.Adrian Prantl2013-06-071-3/+3
| | | | llvm-svn: 183475
* ObjC Debug Info: Emit the names of accessors whenever they diverge fromAdrian Prantl2013-06-071-4/+34
| | | | | | | | the default names, not just when the isImplicit flag is set. rdar://problem/14035789 llvm-svn: 183474
* Improve documentation.Adrian Prantl2013-06-071-6/+12
| | | | llvm-svn: 183473
* PR14763: Debug info for non-trivial record parametersDavid Blaikie2013-06-051-16/+0
| | | | | | | | | | There seems to have been some erroneous code attempting to describe the ABI of parameters (non-trivial record parameters are passed by reference). This would break the type of the function (especially when it caused a mismatch between the type of a declaration & a definition) causing PR14763 and PR14645. llvm-svn: 183329
* PR16214: Debug Info: -flimit-debug-info doesn't omit definitions for types ↵David Blaikie2013-06-051-33/+21
| | | | | | | | | | | | | | | | | | | | used via typedefs In an effort to make -flimit-debug-info more consistent I over-shot the mark & made types used via typedefs never produce definitions in the debug info (even if the type was used in a way that would require a definition). The fix for this is to do exactly what I was hoping to do at some point - plumb the declaration/definition choice through the various layers of "CreateType" in CGDebugInfo. In this way we can produce declarations whenever they are sufficient & definitions otherwise - including when qualifiers are used, for example (discovered in PR14467). This may not be complete (there may be other types/situations where we need to propagate the "declaration/definition" choice) but it lays the basic foundation which we can enhance in future iterations. llvm-svn: 183296
* DebugInfo: Rename CreatePointerType to getOrCreateTypeDeclarationDavid Blaikie2013-05-241-9/+11
| | | | | | | | | | | | | | | | To make this more consistent with 'getOrCreateType' & clarify the distinction between the two. The only thing I couldn't quite communicate in the name is that getOrCreateTypeDeclaration may actually produce a full definition (in -fno-limit-debug-info) but the point is to call it whenever only a declaration is needed & the implementation can choose whether to provide a declaration or definition. (also, unfortunately, getOrCreateType can produce declarations too - we should sure this up by making it not do that - any caller that can tolerate a declaration should be calling getOrCreateTypeDeclaration instead) llvm-svn: 182674
* PR16091: Error when attempting to emit debug info for undeduced auto return ↵David Blaikie2013-05-241-2/+7
| | | | | | | | | | | | types Perhaps we should just suppress this, rather than erroring, but since we have the infrastructure for it I figured I'd use it - if this is determined to be not the right thing we should probably remove that infrastructure entirely. I guess it's lying around from the early days of implementing debug info support. llvm-svn: 182673
* Debug Info: Handle function/method types using the most specific typeDavid Blaikie2013-05-221-10/+10
| | | | llvm-svn: 182533
* Comment and cleanup.Adrian Prantl2013-05-221-5/+7
| | | | | | rdar://problem/13359718 llvm-svn: 182524
* Bugfix for r181629:Adrian Prantl2013-05-221-2/+4
| | | | | | | | | - The return type should be a pointer to the class type. - Make the condition more specific. rdar://problem/13359718 llvm-svn: 182504
* Debug Info: Simplify the code changed in r182403 to reduce indent & avoid a ↵David Blaikie2013-05-211-15/+14
| | | | | | duplicate lookup in the insertion case llvm-svn: 182404
* Debug Info: don't bother reinserting elements into maps we just retrieved ↵David Blaikie2013-05-211-5/+6
| | | | | | | | them from (no intended behavior change) llvm-svn: 182403
* Fix whitespaceDavid Blaikie2013-05-211-8/+6
| | | | llvm-svn: 182400
* PR14606: Debug Info for namespace aliases/DW_TAG_imported_moduleDavid Blaikie2013-05-201-0/+24
| | | | | | | | | This resolves the last of the PR14606 failures in the GDB 7.5 test suite. (but there are still unresolved issues in the imported_decl case - we need to implement optional/lazy decls for functions & variables like we already do for types) llvm-svn: 182329
* Revert "Revert "Debug Info: Using declarations/DW_TAG_imported_declaration ↵David Blaikie2013-05-201-9/+56
| | | | | | | | | | | | | | | | | | | | | of variables, types, and functions."" This reverts commit r181947 (git d2990ce56a16050cac0d7937ec9919ff54c6df62 ) This addresses one of the two issues identified in r181947, ensuring that types imported via using declarations only result in a declaration being emitted for the type, not a definition. The second issue (emitting using declarations that are unused) is hopefully an acceptable increase as the real fix for this would be a bit difficult (probably at best we could record which using directives were involved in lookups - but may not have been the result of the lookup). This also ensures that DW_TAG_imported_declarations (& directives) are not emitted in line-tables-only mode as well as ensuring that typedefs only require/emit declarations (rather than definitions) for referenced types. llvm-svn: 182231
* Drop the const from the isa test.Adrian Prantl2013-05-171-1/+1
| | | | llvm-svn: 182178
* ObjC Debug Info: Emit the correct method names for accessors forAdrian Prantl2013-05-171-0/+7
| | | | | | | | properties declared in a protocol. rdar://problem/13798000 llvm-svn: 182176
* 80-columns.Eric Christopher2013-05-161-12/+23
| | | | llvm-svn: 181965
* Replace a pile of calls with an instance variable that's setEric Christopher2013-05-161-16/+17
| | | | | | once. Should be no functional change. llvm-svn: 181964
* Whitespace.Eric Christopher2013-05-161-100/+100
| | | | llvm-svn: 181960
* Revert "Debug Info: Using declarations/DW_TAG_imported_declaration of ↵David Blaikie2013-05-151-50/+7
| | | | | | | | | | | | | variables, types, and functions." This reverts commit r181393 (git 3923d6a87fe7b2c91cc4a7dbd90c4ec7e2316bcd). This seems to be emitting too much extra debug info for two (known) reasons: * full class definitions are emitted when only declarations are expected * unused using declarations still produce DW_TAG_imported_declarations llvm-svn: 181947
* PR15956: Debug Info: Include the appropriate file location in types created ↵David Blaikie2013-05-141-2/+4
| | | | | | | | | due to using declarations We might benefit from API refactoring here (why pass in a value that's derived from another parameter?) but this is the immediate issue. llvm-svn: 181747
* Debug Info: PR14992: Support values for non-type template parameters of ↵David Blaikie2013-05-131-1/+3
| | | | | | function type llvm-svn: 181685
* Debug Info: Comment changes in r181393 by request of echristoDavid Blaikie2013-05-121-0/+11
| | | | llvm-svn: 181672
* Debug Info: correct commentDavid Blaikie2013-05-101-1/+1
| | | | | | Eric's code review feedback to r181644 llvm-svn: 181650
* Debug Info: Silently accept template argument packsDavid Blaikie2013-05-101-1/+3
| | | | | | | | We could support the GCC extension DW_TAG_GNU_template_parameter_pack if we're feeling adventurous, at some point - but I don't think GDB's doing anything useful with it yet anyway. llvm-svn: 181644
* PR14992: Debug Info: Support more non-type template parametersDavid Blaikie2013-05-101-5/+77
| | | | | | | | | | | | | | | | | * Provide DW_TAG_template_value_parameter for pointers, function pointers, member pointers, and member function pointers (still missing support for template template parameters which GCC encodes as a DW_TAG_GNU_template_template_param) * Provide values for all but the (member & non-member) function pointer case. Simple constant integer values for member pointers (offset within the object) and address for the value pointer case. GCC doesn't provide a value for the member function pointer case so I'm not sure how, if at all, GDB supports encoding that. & non-member function pointers should follow shortly in a subsequent patch. * Null pointer value encodings of all of these types, including correctly encoding null data member pointers as -1. llvm-svn: 181634
* ObjC debug info: Substitute the class type for methods that returnAdrian Prantl2013-05-101-1/+4
| | | | | | | | a related type (e.g., if they use the instancetype keyword). rdar://problem/13359718 llvm-svn: 181629
* Debug Info: Remove unnecessary check for dependent array typesDavid Blaikie2013-05-091-1/+1
| | | | | | | | | | This was added, untested (though the relevant crash was tested), in r128725/PR9600. Removing it doesn't cause failures & nothing I can imagine could cause this check to ever return 'true' (we should never be dealing with dependent types here). The subsequent change to check "isIncompleteType" (r128855/PR9608) makes a lot more sense. llvm-svn: 181542
* typoAdrian Prantl2013-05-081-1/+1
| | | | llvm-svn: 181485
* Debug Info: Using declarations/DW_TAG_imported_declaration of variables, ↵David Blaikie2013-05-081-7/+37
| | | | | | | | | | | | types, and functions. Basic support is implemented here - it still doesn't account for declared-but-not-defined variables or functions. It cannot handle out of order (declared, 'using', then defined) cases for variables, but can handle that for functions (& can handle declared, 'using'd, and not defined at all cases for types). llvm-svn: 181393
* DebugInfo: Support imported modules (using directives) within lexical blocks.David Blaikie2013-05-061-2/+5
| | | | llvm-svn: 181272
* Revert 180817 because 180816 was reverted.Adrian Prantl2013-04-301-0/+16
| | | | llvm-svn: 180823
* Do not generate VLAs as complex variables any more, as they are nowAdrian Prantl2013-04-301-16/+0
| | | | | | | | | | correctly represented as breg+0 locations in the backend. (Paired commit with LLVM: r180815) rdar://problem/13658587 llvm-svn: 180817
OpenPOWER on IntegriCloud