summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/debug-info-template-member.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Adapt testcases to LLVM change r312144 in DIGlobalVariableExpressionAdrian Prantl2017-08-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312148 91177308-0d34-0410-b5e6-96231b3b80d8
* Update for LLVM global variable debug info API change.Adrian Prantl2016-12-201-2/+3
| | | | | | This reapplies r289921. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290155 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Update for LLVM global variable debug info API change."Adrian Prantl2016-12-161-3/+2
| | | | | | This reverts commit r289921. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289984 91177308-0d34-0410-b5e6-96231b3b80d8
* Update for LLVM global variable debug info API change.Adrian Prantl2016-12-161-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289921 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Update for LLVM global variable debug info API change."Adrian Prantl2016-12-161-3/+2
| | | | | | This reverts commit 289901 while investigating bot breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289908 91177308-0d34-0410-b5e6-96231b3b80d8
* Update for LLVM global variable debug info API change.Adrian Prantl2016-12-161-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289901 91177308-0d34-0410-b5e6-96231b3b80d8
* Update Clang for D20147 ("DebugInfo: New metadata representation for global ↵Peter Collingbourne2016-09-131-3/+4
| | | | | | | | variables.") Differential Revision: http://reviews.llvm.org/D20415 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281285 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Adapt to loss of DITypeRef in LLVM r267296Duncan P. N. Exon Smith2016-04-231-21/+23
| | | | | | | | | | | | | LLVM stopped using MDString-based type references, and DIBuilder no longer fills 'retainedTypes:' with every DICompositeType that has an 'identifier:' field. There are just minor changes to keep the same behaviour in CFE. Leaving 'retainedTypes:' unfilled has a dramatic impact on the output order of the IR though. There are a huge number of testcase changes, which were unfortunately not really scriptable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267297 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Make DICompositeTypes distinct most of the timeDuncan P. N. Exon Smith2016-04-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since elements of most kinds of DICompositeType have back references, most are involved in uniquing cycles. Except via the ODR 'identifier:' field, which doesn't care about the storage type (see r266549), they have no hope of being uniqued. Distinct nodes are far more efficient, so use them for most kinds of DICompositeType definitions (i.e., when DIType::isForwardDecl is false). The exceptions: - DW_TAG_array_type, since their elements never have back-references and they never have ODR 'identifier:' fields; - DW_TAG_enumeration_type when there is no ODR 'identifier:' field, since their elements usually don't have back-references. This breaks the last major uniquing cycle I'm aware of in the debug info graph. The impact won't be enormous for C++ because references to ODR-uniqued nodes still use string-based DITypeRefs; but this should prevent a regression in C++ when we drop the string-based references. This wouldn't have been reasonable until r266549, when composite types stopped relying on being uniqued by structural equivalence to prevent blow-ups at LTO time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266556 91177308-0d34-0410-b5e6-96231b3b80d8
* Update to match LLVM changes for PR27284.Adrian Prantl2016-04-151-9/+10
| | | | | | | | | (Reverse the ownership between DICompileUnit and DISubprogram.) http://reviews.llvm.org/D19034 <rdar://problem/25256815> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266445 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop messing with the 'g' group of options in CompilerInvocation.Douglas Katzman2015-10-081-2/+1
| | | | | | | | | | | | | | | | With this change, most 'g' options are rejected by CompilerInvocation. They remain only as Driver options. The new way to request debug info from cc1 is with "-debug-info-kind={line-tables-only|limited|standalone}" and "-dwarf-version={2|3|4}". In the absence of a command-line option to specify Dwarf version, the Toolchain decides it, rather than placing Toolchain-specific logic in CompilerInvocation. Also fix a bug in the Windows compatibility argument parsing in which the "rightmost argument wins" principle failed. Differential Revision: http://reviews.llvm.org/D13221 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249655 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Metadata constructs now start with DI*Duncan P. N. Exon Smith2015-04-291-14/+14
| | | | | | | | | | LLVM r236120 renamed debug info IR constructs to use a `DI` prefix, now that the `DIDescriptor` hierarchy has been gone for about a week. This commit was generated using the rename-md-di-nodes.sh upgrade script attached to PR23080, followed by running clang-format-diff.py on the `lib/` portion of the patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236121 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Move new hierarchy into place (clang)Duncan P. N. Exon Smith2015-03-031-14/+31
| | | | | | | Update testcases for LLVM change in r231082 to use the new debug info hierarchy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231083 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit DeferredDeclsToEmit in a DFS order.Rafael Espindola2015-01-221-1/+1
| | | | | | | | | | | | | | Currently we emit DeferredDeclsToEmit in reverse order. This patch changes that. The advantages of the change are that * The output order is a bit closer to the source order. The change to test/CodeGenCXX/pod-member-memcpys.cpp is a good example. * If we decide to deffer more, it will not cause as large changes in the estcases as it would without this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226751 91177308-0d34-0410-b5e6-96231b3b80d8
* IR: Make metadata typeless in assembly, clang sideDuncan P. N. Exon Smith2014-12-151-18/+18
| | | | | | Match LLVM changes from r224257. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224259 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Don't include implicit special members in the list of class membersDavid Blaikie2014-10-061-6/+7
| | | | | | | | By leaving these members out of the member list, we avoid them being emitted into type unit definitions - while still allowing the definition/declaration to be injected into the compile unit as expected. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219101 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Don't include member function template specializations in the ↵David Blaikie2014-10-061-2/+7
| | | | | | | | | | list of class members By leaving these members out of the member list, we avoid them being emitted into type unit definitions - while still allowing the definition/declaration to be injected into the compile unit as expected. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219100 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Revert "DI: LLVM schema change: fold constants into string""Duncan P. N. Exon Smith2014-10-031-8/+8
| | | | | | | | | | | | | | This reverts commit r218917, effectively reapplying r218913. Original commit message follows. -- Update debug info testcases for an LLVM metadata schema change to fold metadata constant operands into a single `MDString`. Part of PR17891. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219011 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "DI: LLVM schema change: fold constants into string"Duncan P. N. Exon Smith2014-10-021-8/+8
| | | | | | This reverts commit r218913 while I investigate some bots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218917 91177308-0d34-0410-b5e6-96231b3b80d8
* DI: LLVM schema change: fold constants into stringDuncan P. N. Exon Smith2014-10-021-8/+8
| | | | | | | | | Update debug info testcases for an LLVM metadata schema change to fold metadata constant operands into a single `MDString`. Part of PR17891. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218913 91177308-0d34-0410-b5e6-96231b3b80d8
* [Debug Info] add DISubroutineType and its creation takes DITypeArray.Manman Ren2014-07-281-2/+2
| | | | | | | | This is the last patch to unique the type array of a subroutine type. This is the paired commit with llvm r214132. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214133 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug info: Update testcases to new DIBuilder behaviour. Variables nowAdrian Prantl2014-03-181-2/+2
| | | | | | store DIRefs to their types for improved type uniquing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204105 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement a new -fstandalone-debug option. rdar://problem/15685848Adrian Prantl2014-01-071-1/+1
| | | | | | | | | | | | | | It controls everything that -flimit-debug-info used to, plus the vtable type optimization. The old -fno-limit-debug-info option is now an alias to -fstandalone-debug and vice versa. Standalone is the default on Darwin until dtrace is updated to work with non-standalone debug info (rdar://problem/15758808). Note: I kept the LimitedDebugInfo name in CodeGenOptions::DebugInfoKind because NoStandaloneDebugInfo sounded even more confusing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198655 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: update testing cases when the context and type fields ofManman Ren2013-10-091-4/+5
| | | | | | | | | template_type and template_value are updated to use DIRef. Paired commit with r192320. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192321 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: update testing cases when the derived-from field ofManman Ren2013-10-081-1/+1
| | | | | | | | | DIDerivedType is updated to use DITypeRef. Paired commit with r192246. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192247 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: update testing cases when the derived-from field of aManman Ren2013-10-051-3/+3
| | | | | | | | | DW_TAG_pointer_type is updated to use DITypeRef. Paired commit with r192018. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192019 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily revert r191801 due to conflicts with the revert of r191792.Eric Christopher2013-10-041-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191968 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: update testing cases when the derived-from field of aManman Ren2013-10-011-3/+3
| | | | | | | | | DW_TAG_pointer_type is updated to use DITypeRef. Paired commit with r191800. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191801 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: Update testing case.Manman Ren2013-09-061-2/+2
| | | | | | | | DIBuilder now uses an identifier to reference DIType in containing type field of a DICompositeType (in r190190). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190191 91177308-0d34-0410-b5e6-96231b3b80d8
* PR17046, PR17092: Debug Info assert-on-valid due to member loss when context ↵David Blaikie2013-09-061-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | creation recreates the item the context is created for By removing the possibility of strange partial definitions with no members that older GCC's produced for the otherwise unreferenced outer types of referenced inner types, we can simplify debug info generation and correct this bug. Newer (4.8.1 and ToT) GCC's don't produce this quirky debug info, and instead produce the full definition for the outer type (except in the case where that type is dynamic and its vtable is not emitted in this TU). During the creation of the context for a type, we may revisit that type (due to the need to visit template parameters, among other things) and used to end up visiting it first there. Then when we would reach the original code attempting to define that type, we would lose debug info by overwriting its members. By avoiding the possibility of latent "defined with no members" types, we can be sure than whenever we already have a type in a cache (either a definition or declaration), we can just return that. In the case of a full definition, our work is done. In the case of a partial definition, we must already be in the process of completing it. And in the case of a declaration, the completed/vtable/etc callbacks can handle converting it to a definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190122 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: generate a unique identifier for C++ struct, class, union, and enum.Manman Ren2013-08-291-8/+10
| | | | | | | | | | | | | | | | | We use CXX mangler to generate unique identifier for external C++ struct, union, class and enum. Types with unique identifier are added to retained types by DIBuilder. Testing cases are updated to reflect the unique identifier generated for types. The order of MDNodes is changed because of retained types and testing cases are updated accordingly. Testing case debug-info-uuid.cpp now emits error with Itanium mangler, since uuid is not yet handled in Itanium mangler. And it will check for the error message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189622 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: this reverts commit r189600.Manman Ren2013-08-291-10/+8
| | | | | | | | | We had further discussions on how to retain types, whether to do it in front end or in DIBuilder. And we agree to do it in DIBuilder so front ends generating unique identifier do not need to worry about retaining them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189609 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: generate a unique identifier for C++ struct, class, union, and enum.Manman Ren2013-08-291-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | We use CXX mangler to generate unique identifier for external C++ struct, union, class and enum. Types with unique identifier are added to RetainedTypes to make sure they are treated as used even when all uses are replaced with the identifiers. A single type can be added to RetainedTypes multiple times. For example, both createForwardDecl and createLimitedType can add the same type to RetainedTypes. A set is used to avoid duplication when updating AllRetainTypes in DIBuilder. Testing cases are updated to reflect the unique identifier generated for types. The order of MDNodes is changed because of retained types and testing cases are updated accordingly. Testing case debug-info-uuid.cpp now emits error with Itanium mangler, since uuid is not yet handled in Itanium mangler. We choose to update RetainedTypes in clang, then at finalize(), we update AllRetainTypes in DIBuilder. The other choice is to update AllRetainTypes in DIBuilder when creating a DICompositeType with unique identifier. This option requires using ValueHandle for AllRetainTypes in DIBuilder since the created DICompositeType can be modified later on by setContainingType etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189600 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Further fix/improvements to r189494 (and LLVM r189495).David Blaikie2013-08-281-3/+8
| | | | | | | Selfhosting was crashing with the same type of problem but involving template specializations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189530 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: follow-up patch to r189283.Manman Ren2013-08-261-1/+1
| | | | | | | | Thanks David for his suggestion. This commit updates testing cases to have more specific CHECKs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189286 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug Info: add an identifier field to DICompositeType.Manman Ren2013-08-261-3/+3
| | | | | | | | Paired with llvm r189282. Update testing cases to handle an extra field for DICompositeType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189283 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Avoid duplicating types that may be created during the process of ↵David Blaikie2013-08-181-0/+28
| | | | | | | | | | | | creating their context A partner to r188639, this is a somewhat heavy-handed fix to the general issue, since even after that prior change the issue does still unavoidably arise with template parameters (see test case). There are other ways we could consider addressing this (see FIXME). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188640 91177308-0d34-0410-b5e6-96231b3b80d8
* Only emit debug info for implicit members that actually get codegen, not ↵David Blaikie2013-08-091-16/+14
| | | | | | | | | | | | just ODR use. This includes special members (copy/default ctor, copy assign, default ctor) and template specializations for member function templates. Good for a 5% decrease (1.80 to 1.71 GB) in size on Clang+LLVM's .dwo files (when using fission). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188085 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify/generalize some debug info test casesDavid Blaikie2013-03-191-3/+3
| | | | | | | | | Mostly, try to depend on the annotation comments more so these tests are more legible, brief, and agnostic to schema changes in the future (sure, they're not agnostic to changes to the comment annotations but since they're easier to read they should be easier to update if that happens). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177457 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r158009 since there are some uses of artificial functions inEric Christopher2012-10-171-1/+1
| | | | | | debug info. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166109 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply "Only emit debug information for methods that are user defined, there's"Eric Christopher2012-06-051-1/+1
| | | | | | | | As the failing testcase has been fixed. This reverts commit 0637f407e6ee7fdccde17fbf9a5fcc4853187b3e. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158009 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Only emit debug information for methods that are user defined, there's"John McCall2012-06-051-1/+1
| | | | | | | This reverts r157970, which was not passing on clang-x86_64-darwin10-nobootstrap-RA git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157983 91177308-0d34-0410-b5e6-96231b3b80d8
* Only emit debug information for methods that are user defined, there'sEric Christopher2012-06-051-1/+1
| | | | | | | | | not much reason to emit for constructors and destructors that aren't user defined. rdar://11593099 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157970 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to mangle templated member function names with templateEric Christopher2012-03-141-1/+1
| | | | | | | | args. Fixes rdar://11042577 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152691 91177308-0d34-0410-b5e6-96231b3b80d8
* When adding member functions to a class add any specializations ofEric Christopher2012-03-131-0/+21
function templates as well. A future commit will mangle the added name with the template args like classes are mangled. Fixes rdar://10986010 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152683 91177308-0d34-0410-b5e6-96231b3b80d8