about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-09-16 23:45:49 -0700
committerbors <bors@rust-lang.org>2013-09-16 23:45:49 -0700
commitd1c05504ba0ec65aac73ebaac82cbac7602d0f87 (patch)
tree02abbe4f94a95845e154e73dade8ef92e3dda6be /src/rustllvm/PassWrapper.cpp
parent66ecff2b136dccabae98d2413632ff5177313205 (diff)
parent010702899197b3305126746adb4278d9da370808 (diff)
downloadrust-d1c05504ba0ec65aac73ebaac82cbac7602d0f87.tar.gz
rust-d1c05504ba0ec65aac73ebaac82cbac7602d0f87.zip
auto merge of #9130 : alexcrichton/rust/inline-globals, r=thestinger
In #8185 cross-crate condition handlers were fixed by ensuring that globals
didn't start appearing in different crates with different addressed. An
unfortunate side effect of that pull request is that constants weren't inlined
across crates (uint::bits is unknown to everything but libstd).

This commit fixes this inlining by using the `available_eternally` linkage
provided by LLVM. It partially reverts #8185, and then adds support for this
linkage type. The main caveat is that not all statics could be inlined into
other crates. Before this patch, all statics were considered "inlineable items",
but an unfortunate side effect of how we deal with `&static` and `&[static]`
means that these two cases cannot be inlined across crates. The translation of
constants was modified to propogate this condition of whether a constant
should be considered inlineable into other crates.

Closes #9036
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions