Go to file
Adrian Prantl 8c59921ca3 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
clang [Sema][ObjC] Use SmallSetVector to fix a failing test on the reverse 2018-02-06 23:44:40 +00:00
clang-tools-extra Support special acronyms inside property names and allow plural forms 2018-02-06 21:40:38 +00:00
compiler-rt [Sanitizers, Darwin] Disable SANITIZER_SUPPORTS_WEAK_HOOKS before Mac OS X 10.9 2018-02-05 23:02:09 +00:00
debuginfo-tests [debuginfo-tests] Support moving debuginfo-tests to llvm/projects 2017-12-12 16:54:20 +00:00
libclc Add vstore_half_rte implementation 2018-02-06 18:44:50 +00:00
libcxx Remove more of the std::experimental bits that are now in std::. All the _v type aliases, conjunction/disjunction, apply, etc. See https://libcxx.llvm.org/TS_deprecation.html 2018-02-06 23:13:48 +00:00
libcxxabi [demangler] Refactor the type parser 2018-02-05 22:41:20 +00:00
libunwind [cmake] [libunwind] LLVM_FOUND isn't always set, so just test if 2018-01-27 19:31:44 +00:00
lld Convert a use of Config->Static. 2018-02-06 22:59:24 +00:00
lldb Remove obsolete file 2018-02-06 21:04:06 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm Add DWARF for discriminated unions 2018-02-06 23:45:59 +00:00
openmp [OMPT] Fix tool initialization returning 0 2018-02-06 08:41:27 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default. 2018-02-03 06:59:47 +00:00
README.md Add an svn project to contain the files that appear at the root of the 2017-10-19 21:09:49 +00:00

README.md

Low Level Virtual Machine (LLVM)

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.