summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/debug-info.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [DebugInfo] NFC Clang test changes for: IR/Bitcode changes for DISubprogram ↵Paul Robinson2018-11-281-1/+1
| | | | | | | | flags. Differential Revision: https://reviews.llvm.org/D54756 llvm-svn: 347807
* Adapt testcases to LLVM change r312144 in DIGlobalVariableExpressionAdrian Prantl2017-08-301-1/+1
| | | | llvm-svn: 312148
* Parse and print DIExpressions inline to ease IR and MIR testingReid Kleckner2017-08-231-2/+1
| | | | | | | | | | | | | | | | | | | Summary: Most DIExpressions are empty or very simple. When they are complex, they tend to be unique, so checking them inline is reasonable. This also avoids the need for CodeGen passes to append to the llvm.dbg.mir named md node. See also PR22780, for making DIExpression not be an MDNode. Reviewers: aprantl, dexonsmith, dblaikie Subscribers: qcolombet, javed.absar, eraman, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D37075 llvm-svn: 311594
* Debug Info: Remove special-casing of indirect function argument handling.Adrian Prantl2017-04-181-1/+1
| | | | | | | | | | | | LLVM has changed the semantics of dbg.declare for describing function arguments. After this patch a dbg.declare always takes the *address* of a variable as the first argument, even if the argument is not an alloca. https://bugs.llvm.org/show_bug.cgi?id=32382 rdar://problem/31205000 llvm-svn: 300523
* Update for LLVM global variable debug info API change.Adrian Prantl2016-12-201-2/+3
| | | | | | This reapplies r289921. llvm-svn: 290155
* Revert "Update for LLVM global variable debug info API change."Adrian Prantl2016-12-161-3/+2
| | | | | | This reverts commit r289921. llvm-svn: 289984
* Update for LLVM global variable debug info API change.Adrian Prantl2016-12-161-2/+3
| | | | llvm-svn: 289921
* Revert "Update for LLVM global variable debug info API change."Adrian Prantl2016-12-161-3/+2
| | | | | | This reverts commit 289901 while investigating bot breakage. llvm-svn: 289908
* Update for LLVM global variable debug info API change.Adrian Prantl2016-12-161-2/+3
| | | | llvm-svn: 289901
* DebugInfo: pass alignment value only if it was forcedVictor Leschuk2016-10-201-2/+2
| | | | | | | | | | Preparation to implement DW_AT_alignment support: - We pass non-zero align value to DIBuilder only when alignment was forced - Modify tests to match this change Differential Revision: https://reviews.llvm.org/D24426 llvm-svn: 284679
* Update Clang for D20147 ("DebugInfo: New metadata representation for global ↵Peter Collingbourne2016-09-131-2/+3
| | | | | | | | variables.") Differential Revision: http://reviews.llvm.org/D20415 llvm-svn: 281285
* DebugInfo: Adapt to loss of DITypeRef in LLVM r267296Duncan P. N. Exon Smith2016-04-231-67/+58
| | | | | | | | | | | | | 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. llvm-svn: 267297
* Update to match LLVM changes for PR27284.Adrian Prantl2016-04-151-3/+4
| | | | | | | | | (Reverse the ownership between DICompileUnit and DISubprogram.) http://reviews.llvm.org/D19034 <rdar://problem/25256815> llvm-svn: 266445
* Stop messing with the 'g' group of options in CompilerInvocation.Douglas Katzman2015-10-081-2/+2
| | | | | | | | | | | | | | | | 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 llvm-svn: 249655
* DI: Update DISubprogram testcases after LLVM r246098Duncan P. N. Exon Smith2015-08-261-3/+3
| | | | llvm-svn: 246099
* DI: Update testcases for LLVM assembly changeDuncan P. N. Exon Smith2015-07-311-2/+4
| | | | | | | | | | Update testcases after LLVM change r243774. Most of these had no need to check `tag:` field, but did so as a way of getting to the `name:` field. In a few cases I've converted the `tag:` checks to `arg:` or `CHECK-NOT: arg:`. llvm-svn: 243775
* DebugInfo: Metadata constructs now start with DI*Duncan P. N. Exon Smith2015-04-291-18/+18
| | | | | | | | | | 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. llvm-svn: 236121
* DebugInfo: Move new hierarchy into place (clang)Duncan P. N. Exon Smith2015-03-031-19/+47
| | | | | | | Update testcases for LLVM change in r231082 to use the new debug info hierarchy. llvm-svn: 231083
* Migrate all uses of DIVariable's FlagIndirectVariable to use a DIExpressionAdrian Prantl2015-01-191-1/+5
| | | | | | with a DW_OP_deref instead. llvm-svn: 226474
* IR: Add 'distinct' MDNodes to bitcode and assembly (clang)Duncan P. N. Exon Smith2015-01-081-1/+1
| | | | | | | | | Update testcases for LLVM change in r225474 to make `MDNode`s explicitly distinct (when they aren't uniqued). Part of PR22111. llvm-svn: 225475
* IR: Make metadata typeless in assembly, clang sideDuncan P. N. Exon Smith2014-12-151-14/+14
| | | | | | Match LLVM changes from r224257. llvm-svn: 224259
* Revert "Revert "DI: LLVM schema change: fold constants into string""Duncan P. N. Exon Smith2014-10-031-10/+10
| | | | | | | | | | | | | | 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. llvm-svn: 219011
* Revert "DI: LLVM schema change: fold constants into string"Duncan P. N. Exon Smith2014-10-021-10/+10
| | | | | | This reverts commit r218913 while I investigate some bots. llvm-svn: 218917
* DI: LLVM schema change: fold constants into stringDuncan P. N. Exon Smith2014-10-021-10/+10
| | | | | | | | | Update debug info testcases for an LLVM metadata schema change to fold metadata constant operands into a single `MDString`. Part of PR17891. llvm-svn: 218913
* Debug info: Use the vbtable offset for virtual bases in the MS ABIReid Kleckner2014-08-071-2/+15
| | | | | | | | There are no vtable offset offsets in the MS ABI, but vbtable offsets are analogous. There are no consumers of this information yet, but at least we don't crash now. llvm-svn: 215149
* Revert "Debug info: Use record layout to find vbase offsets instead of vtables"Reid Kleckner2014-08-071-8/+2
| | | | | | | | | This reverts commit r215137. This doesn't work at all, an offset-offset is probably different than an offset. I'm scared that this passed our normal test suite. llvm-svn: 215141
* Debug info: Use record layout to find vbase offsets instead of vtablesReid Kleckner2014-08-071-2/+8
| | | | | | | | | This fixes an assertion when generating full debug info in the MS ABI for classes with virtual bases. Fixes PR20579. llvm-svn: 215137
* Revert "DebugInfo: Place global constants in their appropriate context."David Blaikie2014-04-051-8/+1
| | | | | | | | | This reverts commit r205655. Breaks the compiler-rt build with an assertion failure in LLVM... reverting while I investigate. llvm-svn: 205664
* DebugInfo: Place global constants in their appropriate context.David Blaikie2014-04-041-1/+8
| | | | | | | We also don't need to duplicate the name in the LinkageName field. Just leave it empty. llvm-svn: 205655
* DebugInfo: PR19298: function local const variables duplicated in the root scopeDavid Blaikie2014-04-041-6/+10
| | | | | | | | | | | | | | See the comment for CodeGenFunction::tryEmitAsConstant that describes how in some contexts (lambdas) we must not emit references to the variable, but instead use the constant directly - because of this we end up emitting a constant for the variable, as well as emitting the variable itself. Should we just skip putting the variable on the stack at all and omit the debug info for the constant? It's not clear to me - what if the address of the local is taken? llvm-svn: 205651
* Debug info: Update testcases to new DIBuilder behaviour. Variables nowAdrian Prantl2014-03-181-2/+2
| | | | | | store DIRefs to their types for improved type uniquing. llvm-svn: 204105
* Debug Info: update testing cases when the derived-from field ofManman Ren2013-10-081-1/+1
| | | | | | | | DICompositeType is updated to use DITypeRef. Paired commit with r192251. llvm-svn: 192252
* Debug Info: generate a unique identifier for C++ struct, class, union, and enum.Manman Ren2013-08-291-8/+9
| | | | | | | | | | | | | | | | 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. llvm-svn: 189622
* Debug Info: this reverts commit r189600.Manman Ren2013-08-291-9/+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. llvm-svn: 189609
* Debug Info: generate a unique identifier for C++ struct, class, union, and enum.Manman Ren2013-08-291-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 189600
* 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. llvm-svn: 189286
* Debug Info: add an identifier field to DICompositeType.Manman Ren2013-08-261-2/+2
| | | | | | | Paired with llvm r189282. Update testing cases to handle an extra field for DICompositeType. llvm-svn: 189283
* Only emit debug info for implicit members that actually get codegen, not ↵David Blaikie2013-08-091-1/+1
| | | | | | | | | | | | 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). llvm-svn: 188085
* DebugInfo: handle the DI asm printing change to reword '[fwd]' as '[decl]' ↵David Blaikie2013-06-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | and add '[def]' for non-decl tag types This is to make test cases looking for definitions more legible by making the definition explicit rather than just the absence of '[fwd]'. This allowed the debug-info-record tests to be rephrased - and in the interests of reducing the number of individual test cases/invocations we have, I merged them into one file, separated them with namespaces (& then moved them to C++ because namespaces are great). If they need to remain 'C' only tests, they can be moved back. (I didn't group them with 'debug-info-class.cpp' because these tests only apply to -fno-limit-debug-info) I removed the pieces of code that would cause these tests to pass under -flimit-debug-info to ensure the tests remain relevant to their fixes should we ever improve -flimit-debug-info to catch that kind of code. This commit is version locked with the corresponding change to DebugInfo.h in LLVM. Except some transient buildbot fallout. llvm-svn: 184524
* Fix CodeGenCXX/debug-info.cpp to target a known ABI (x86-64-linux) so as not ↵David Blaikie2013-06-201-2/+2
| | | | | | to be confused by strange (& currently broken) Windows ABI llvm-svn: 184442
* Fix CodeGenCXX/debug-info.cpp test on WindowsReid Kleckner2013-06-201-1/+1
| | | | | | | | | | On Windows, it looks like FlagIndirectVariable is being set in Flags for DIBuilder::createLocalVariable(), giving us an i32 of 8192 instead of 0, as on Linux. Fixes breakage from r184367. llvm-svn: 184438
* Debug Info: PR14763/r183329 - specify that non-trivial pass-by-value ↵David Blaikie2013-06-191-1/+1
| | | | | | | | | | 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
* PR14763: Debug info for non-trivial record parametersDavid Blaikie2013-06-051-0/+17
| | | | | | | | | | 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-0/+24
| | | | | | | | | | | | | | | | | | | | 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
* Fix some test cases I broke in r181552David Blaikie2013-05-091-1/+1
| | | | llvm-svn: 181554
* DebugInfo: Simply & constrain test(s) for PR9600/PR9608David Blaikie2013-05-091-1/+10
| | | | | | | | | | | | | | | | | | | | | Both these tests were ultimately fixed by the check for "isIncompleteType" & neither test case was really reduced to a minimal form. On doing so it becomes apparent that the problem wasn't specific to templates at all, so I've moved the test case to a more appropriate test file and added FileCheck verification to it (to show the forward declaration of the array element type as well as the array alignment and size being 0 since it cannot be computed). That's about as far down this rabbithole as I'm willing to go today, so the rest of the un-FileChecked tests in test/CodeGenCXX/debug-info.cpp will have to go another day without actually testing anything other than the fact that they don't crash. & improve the actually interesting test case in test/CodeGenCXX/debug-info-templates.cpp which was my original goal (in preparation for expanding it/fixing some related bugs in non-type template parameters) llvm-svn: 181552
* Revert "Revert r178079, it caused PR15637."Eric Christopher2013-04-021-7/+0
| | | | | | | | This reverts commit r178497 since the backend has been fixed. Also add a test to ensure that we're emitting template information for unions. llvm-svn: 178587
* Revert r178079, it caused PR15637.Nico Weber2013-04-011-0/+7
| | | | | | Also add a test for PR15637. llvm-svn: 178497
* Don't try to emit unsupported templated friend declarations. They're unsupportedNick Lewycky2011-09-011-0/+12
| | | | | | | and may very well be dependent-types, triggering an assertion in debug info codegen. llvm-svn: 138970
* test case for PR7920.Devang Patel2010-08-231-0/+5
| | | | llvm-svn: 111821
OpenPOWER on IntegriCloud