diff options
| author | bors <bors@rust-lang.org> | 2016-09-21 01:33:37 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-09-21 01:33:37 -0700 |
| commit | 5cc6c6b1b76960441c39ef29e951f22de45da15b (patch) | |
| tree | 13940d8d1b688ff8e4e8d6958eb47d4b152ea999 /src/rustllvm/RustWrapper.cpp | |
| parent | c772948b687488a087356cb91432425662e034b9 (diff) | |
| parent | cf976fe2cd92a7a4923e6a0934c8f15333b6589d (diff) | |
| download | rust-5cc6c6b1b76960441c39ef29e951f22de45da15b.tar.gz rust-5cc6c6b1b76960441c39ef29e951f22de45da15b.zip | |
Auto merge of #36524 - michaelwoerister:trans-inline-only-on-demand, r=nikomatsakis
trans: Only instantiate #[inline] functions in codegen units referencing them This PR changes how `#[inline]` functions are translated. Before, there was one "master instance" of the function with `external` linkage and a number of on-demand instances with `available_externally` linkage in each codegen unit that referenced the function. This had two downsides: * Public functions marked with `#[inline]` would be present in machine code of libraries unnecessarily (see #36280 for an example) * LLVM would crash on `i686-pc-windows-msvc` due to what I suspect to be a bug in LLVM's Win32 exception handling code, because it doesn't like `available_externally` there (#36309). This PR changes the behavior, so that there is no master instance and only on-demand instances with `internal` linkage. The downside of this is potential code-bloat if LLVM does not completely inline away the `internal` instances because then there'd be N instances of the function instead of 1. However, this can only become a problem when using more than one codegen unit per crate. cc @rust-lang/compiler
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
