1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/unittests
Adrian Prantl 821c2290a5 Add DWARF for discriminated unions
n Rust, an enum that carries data in the variants is, essentially, a
discriminated union. Furthermore, the Rust compiler will perform
space optimizations on such enums in some situations. Previously,
DWARF for these constructs was emitted using a hack (a magic field
name); but this approach stopped working when more space optimizations
were added in https://github.com/rust-lang/rust/pull/45225.

This patch changes LLVM to allow discriminated unions to be
represented in DWARF. It adds createDiscriminatedUnionType and
createDiscriminatedMemberType to DIBuilder and then arranges for this
to be emitted using DWARF's DW_TAG_variant_part and DW_TAG_variant.

Note that DWARF requires that a discriminated union be represented as
a structure with a variant part. However, as Rust only needs to emit
pure discriminated unions, this is what I chose to expose on
DIBuilder.

Patch by Tom Tromey!

Differential Revision: https://reviews.llvm.org/D42082

llvm-svn: 324426
2018-02-06 23:45:59 +00:00
..
ADT Fix incorrect usage of std::is_assignable. 2018-02-02 22:29:54 +00:00
Analysis [SCEV] Do not cache S -> V if S is not equivalent of V 2018-01-09 06:47:14 +00:00
AsmParser
BinaryFormat
Bitcode Remove redundant includes from unittests. 2017-12-13 21:31:05 +00:00
CodeGen Followup on Proposal to move MIR physical register namespace to '$' sigil. 2018-01-31 22:04:26 +00:00
DebugInfo [MSF] Fix FPM interval calcluation 2018-01-05 18:12:14 +00:00
ExecutionEngine [ORC] Start migrating ORC layers to use the new ORC Core.h APIs. 2018-02-06 21:25:11 +00:00
FuzzMutate [FuzzMutate] Inst deleter doesn't work with PhiNodes 2018-01-25 09:22:18 +00:00
IR Add DWARF for discriminated unions 2018-02-06 23:45:59 +00:00
LineEditor
Linker
MC
MI Followup on Proposal to move MIR physical register namespace to '$' sigil. 2018-01-31 22:04:26 +00:00
Object
ObjectYAML
Option [Option] For typo '-foo', suggest '--foo' 2018-01-09 19:38:04 +00:00
ProfileData Remove redundant includes from unittests. 2017-12-13 21:31:05 +00:00
Support Fix incorrect usage of std::is_assignable. 2018-02-02 22:29:54 +00:00
Target
tools [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Transforms Utils: Fix DomTree update for entry block 2018-01-31 22:54:37 +00:00
XRay
CMakeLists.txt