rust/src/rustllvm
Alex Crichton 3e9589c0f4 trans: Reimplement unwinding on MSVC
This commit transitions the compiler to using the new exception handling
instructions in LLVM for implementing unwinding for MSVC. This affects both 32
and 64-bit MSVC as they're both now using SEH-based strategies. In terms of
standard library support, lots more details about how SEH unwinding is
implemented can be found in the commits.

In terms of trans, this change necessitated a few modifications:

* Branches were added to detect when the old landingpad instruction is used or
  the new cleanuppad instruction is used to `trans::cleanup`.
* The return value from `cleanuppad` is not stored in an `alloca` (because it
  cannot be).
* Each block in trans now has an `Option<LandingPad>` instead of `is_lpad: bool`
  for indicating whether it's in a landing pad or not. The new exception
  handling intrinsics require that on MSVC each `call` inside of a landing pad
  is annotated with which landing pad that it's in. This change to the basic
  block means that whenever a `call` or `invoke` instruction is generated we
  know whether to annotate it as part of a cleanuppad or not.
* Lots of modifications were made to the instruction builders to construct the
  new instructions as well as pass the tagging information for the call/invoke
  instructions.
* The translation of the `try` intrinsics for MSVC has been overhauled to use
  the new `catchpad` instruction. The filter function is now also a
  rustc-generated function instead of a purely libstd-defined function. The
  libstd definition still exists, it just has a stable ABI across architectures
  and leaves some of the really weird implementation details to the compiler
  (e.g. the `localescape` and `localrecover` intrinsics).
2016-01-29 16:25:20 -08:00
..
ArchiveWrapper.cpp trans: Upgrade LLVM 2016-01-29 16:25:20 -08:00
ExecutionEngineWrapper.cpp Remove morestack support 2015-08-10 16:35:44 -07:00
llvm-auto-clean-trigger trans: Upgrade LLVM 2016-01-29 16:25:20 -08:00
PassWrapper.cpp Register LLVM passes with the correct LLVM pass manager. 2016-01-25 00:15:39 -05:00
README add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
rustllvm.h rustc: Update LLVM 2015-06-16 22:56:42 -07:00
RustWrapper.cpp trans: Reimplement unwinding on MSVC 2016-01-29 16:25:20 -08:00

This directory currently contains some LLVM support code. This will generally
be sent upstream to LLVM in time; for now it lives here.