aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/debug-info-enum-class.cpp
AgeCommit message (Collapse)Author
2019-01-08Rename DIFlagFixedEnum to DIFlagEnumClass. NFCPaul Robinson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350641 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08Don't emit DW_AT_enum_class unless it's actually an 'enum class'.Paul Robinson
Finishes off the functional part of PR36168. Differential Revision: https://reviews.llvm.org/D56393 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350636 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-12Re-commit r324490: [DebugInfo] Improvements to representation of enumeration ↵Momchil Velikov
types (PR36168) Differential revision: https://reviews.llvm.org/D42736 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324900 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-07Revert [DebugInfo] Improvements to representation of enumeration types ↵Momchil Velikov
(PR36168)" Revert due to breaking buildbots (LLDB tests) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324508 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-07[DebugInfo] Improvements to representation of enumeration types (PR36168)Momchil Velikov
This patch: * fixes an incorrect sign-extension of unsigned values, when emitting debug info metadata for enumerators * the enumerators metadata is created with a flag, which determines interpretation of the value bits (signed or unsigned) * the enumerations metadata contains the underlying integer type and a flag, indicating whether this is a C++ "fixed enum" Differential Revision: https://reviews.llvm.org/D42736 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324490 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-20DebugInfo: pass alignment value only if it was forcedVictor Leschuk
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284679 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-23DebugInfo: Adapt to loss of DITypeRef in LLVM r267296Duncan P. N. Exon Smith
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
2016-03-25Debug Info: Add a testcase for the bug introduced by r259975.Adrian Prantl
In r259975 we rauw'ed the scope of enum declarations without taking into account that DIBuilder strips out scope references that point to the DICompileUnit to facilitate type uniquing. This testcase guards against making the same mistake again. <rdar://problem/25078246> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264366 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-08Stop messing with the 'g' group of options in CompilerInvocation.Douglas Katzman
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
2015-04-29DebugInfo: Metadata constructs now start with DI*Duncan P. N. Exon Smith
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
2015-03-03DebugInfo: Move new hierarchy into place (clang)Duncan P. N. Exon Smith
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
2014-12-15IR: Make metadata typeless in assembly, clang sideDuncan P. N. Exon Smith
Match LLVM changes from r224257. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224259 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-03Revert "Revert "DI: LLVM schema change: fold constants into string""Duncan P. N. Exon Smith
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
2014-10-02Revert "DI: LLVM schema change: fold constants into string"Duncan P. N. Exon Smith
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
2014-10-02DI: LLVM schema change: fold constants into stringDuncan P. N. Exon Smith
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
2014-05-06Reapply: DebugInfo: Emit the definition of enums when the definition ↵David Blaikie
preceeds the declaration and initial use. Reverting r208106 to reapply r208065 with a fix for the regression. The issue was that the enum tried to be built even if the declaration hadn't been constructed for debug info - presenting problems for enum templates and typedefs of enums with names for linkage purposes. Original commit message: This regressed a little further 208055 though it was already a little broken. While the requiresCompleteType optimization should be implemented here. Future (possibly near future) work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208114 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06Revert "DebugInfo: Emit the definition of enums when the definition preceeds ↵David Blaikie
the declaration and initial use." This is breaking the compiler-rt build. Reverting while I investigate/fix. This reverts commit r208065. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208106 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-06DebugInfo: Emit the definition of enums when the definition preceeds the ↵David Blaikie
declaration and initial use. This regressed a little further 208055 though it was already a little broken. While the requiresCompleteType optimization should be implemented here. Future (possibly near future) work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208065 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-21DebugInfo: handle the DI asm printing change to reword '[fwd]' as '[decl]' ↵David Blaikie
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184524 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-19Simplify/generalize some debug info test casesDavid Blaikie
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
2013-02-02Generalize DebugInfo tests by avoiding explicit metadata numbersDavid Blaikie
This addresses several (not all) debug info tests that use explicit metadata numbers. Wherever the same number appeared more than once in a test I used a named match to ensure the same number appeared in all those cases (this may still be overly constraining test cases as they may not have actually cared about that relationship). For one-off numbers I just replaced them with an unnamed regex. This may underconstrain poorly written test cases that were interested in checking that certain metadata nodes were related but didn't actually match on all the related nodes numbers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174247 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-05Make sure to generate the right kind of MDNode for enum forward declarations.Eli Friedman
PR14029, clang part. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165289 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-01Support C++11 enum forward declarations.Eric Christopher
Part of rdar://11570854 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157787 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-23Emit C++11 enum class information if it exists.Eric Christopher
Part of rdar://11496790 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157304 91177308-0d34-0410-b5e6-96231b3b80d8