summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/debug-info-anon-union-vars.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update Clang for D20147 ("DebugInfo: New metadata representation for global ↵Peter Collingbourne2016-09-131-1/+1
| | | | | | | | variables.") Differential Revision: http://reviews.llvm.org/D20415 llvm-svn: 281285
* Reverting 268055 as it caused PR27579.Amjad Aboud2016-04-301-8/+8
| | | | llvm-svn: 268151
* Recommitted r264281 "Supporting all entities declared in lexical scope in ↵Amjad Aboud2016-04-291-8/+8
| | | | | | | | LLVM debug info." After fixing PR26942 in r267004. llvm-svn: 268055
* DebugInfo: Make DICompositeTypes distinct most of the timeDuncan P. N. Exon Smith2016-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 266556
* Update to match LLVM changes for PR27284.Adrian Prantl2016-04-151-2/+2
| | | | | | | | | (Reverse the ownership between DICompileUnit and DISubprogram.) http://reviews.llvm.org/D19034 <rdar://problem/25256815> llvm-svn: 266445
* Revert "Recommitted r263425 "Supporting all entities declared in lexical ↵Reid Kleckner2016-03-241-6/+6
| | | | | | | | | | | scope in LLVM debug info." After fixing PR26942 (the fix is included in this commit)." This reverts commit r264281. This change breaks building Chromium for iOS. We'll upload a reproducer to the PR soon. llvm-svn: 264333
* Recommitted r263425 "Supporting all entities declared in lexical scope in ↵Amjad Aboud2016-03-241-6/+6
| | | | | | | | | | LLVM debug info." After fixing PR26942 (the fix is included in this commit). Differential Revision: http://reviews.llvm.org/D18350 llvm-svn: 264281
* Revert "Recommitted r261634 "Supporting all entities declared in lexical ↵Benjamin Kramer2016-03-141-6/+6
| | | | | | | | scope in LLVM debug info." After fixing PR26715 at r263379." This reverts commit r263425. Breaks self-host. llvm-svn: 263436
* Recommitted r261634 "Supporting all entities declared in lexical scope in ↵Amjad Aboud2016-03-141-6/+6
| | | | | | | | LLVM debug info." After fixing PR26715 at r263379. llvm-svn: 263425
* Revert r261634 "Supporting all entities declared in lexical scope in LLVM ↵Hans Wennborg2016-02-231-6/+6
| | | | | | | | debug info." and r261657 r261634 and r261633 seems to have caused PR26715. r261657 depends on the former two. llvm-svn: 261670
* Supporting all entities declared in lexical scope in LLVM debug info.Amjad Aboud2016-02-231-6/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D15977 llvm-svn: 261634
* [DebugInfo] Look through type sugar on union types when castingReid Kleckner2015-11-201-0/+17
| | | | | | Fixes PR25584. llvm-svn: 253680
* Stop messing with the 'g' group of options in CompilerInvocation.Douglas Katzman2015-10-081-1/+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 llvm-svn: 249655
* DI: Update testcases for LLVM assembly changeDuncan P. N. Exon Smith2015-07-311-2/+2
| | | | | | | | | | 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
* Debug Info: Represent local anonymous unions as anonymous unionsAdrian Prantl2015-04-291-0/+18
| | | | | | | | | | | | | | | | and as artificial local variables in the debug info. This is a follow-up to r236059. We can't get rid of the local variables entirely because the gdb buildbot depends on them, but we can mark them as artificial while still emitting the correct debug info. As I learned from review comments other compilers also follow this model. A paired commit in LLVM temporarily relaxes the debug info verifier to not check the integrity of DW_OP_bit_pieces of artificial variables. rdar://problem/20730771 llvm-svn: 236125
* DebugInfo: Metadata constructs now start with DI*Duncan P. N. Exon Smith2015-04-291-5/+5
| | | | | | | | | | 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
* Revert "Debug Info: Represent local anonymous unions as anonymous unions"Adrian Prantl2015-04-291-18/+0
| | | | | | This reverts commit r236059 as it breaks the gdb buildbot. llvm-svn: 236110
* Debug Info: Represent local anonymous unions as anonymous unionsAdrian Prantl2015-04-281-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the debug info. This patch deletes a hack that emits the members of local anonymous unions as local variables. Besides being morally wrong, the existing representation using local variables breaks internal assumptions about the local variables' storage size. Compiling ``` void fn1() { union { int i; char c; }; i = c; } ``` with -g -O3 -verify will cause the verifier to fail after SROA splits the 32-bit storage for the "local variable" c into two pieces because the second piece is clearly outside the 8-bit range that is expected for a variable of type char. Given the choice I'd rather fix the debug representation than weaken the verifier. Debuggers generally already know how to deal with anonymous unions when they are members of C++ record types, but they may have problems finding the local anonymous struct members in the expression evaluator. rdar://problem/20730771 llvm-svn: 236059
* DebugInfo: Move new hierarchy into place (clang)Duncan P. N. Exon Smith2015-03-031-5/+5
| | | | | | | Update testcases for LLVM change in r231082 to use the new debug info hierarchy. llvm-svn: 231083
* Add global static variables for anonymous union fields. This makesEric Christopher2014-04-101-0/+28
sure that a debugger can find them when stepping through code, for example from the included testcase: 12 int test_it() { 13 c = 1; 14 d = 2; -> 15 a = 4; 16 return (c == 1); 17 } 18 (lldb) p a (int) $0 = 2 (lldb) p c (int) $1 = 2 (lldb) p d (int) $2 = 2 and a, c, d are all part of the file static anonymous union: static union { int c; int d; union { int a; }; struct { int b; }; }; Fixes PR19221. llvm-svn: 205952
OpenPOWER on IntegriCloud