about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-03-27 11:42:04 -0700
committerAlex Crichton <alex@alexcrichton.com>2018-03-27 14:38:20 -0700
commit38d48ef53778674baa99dd0a3a193cec78f74e63 (patch)
tree936fa1620b03ac551ff866f46418a27d5fb374d7 /src/rustllvm/PassWrapper.cpp
parent9c9424de51da41fd3d1077ac7810276f8dc746fa (diff)
downloadrust-38d48ef53778674baa99dd0a3a193cec78f74e63.tar.gz
rust-38d48ef53778674baa99dd0a3a193cec78f74e63.zip
rustc: Forbid #[inline(always)] with #[target_feature]
Once a target feature is enabled for a function that means that it in general
can't be inlined into other functions which don't have that target feature
enabled. This can cause both safety and LLVM issues if we were to actually
inline it, so `#[inline(always)]` both can't be respected and would be an error
if we did so!

Today LLVM doesn't inline functions with different `#[target_feature]`
annotations, but it turns out that if one is tagged with `#[inline(always)]`
it'll override this and cause scary LLVM error to arise!

This commit fixes this issue by forbidding these two attributes to be used in
conjunction with one another.

cc rust-lang-nursery/stdsimd#404
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions