rust/compiler/rustc_llvm
bors c42d846add Auto merge of #94229 - erikdesjardins:rem2, r=nikic
Remove LLVM attribute removal

This was necessary before, because `declare_raw_fn` would always apply
the default optimization attributes to every declared function.
Then `attributes::from_fn_attrs` would have to remove the default
attributes in the case of, e.g. `#[optimize(speed)]` in a `-Os` build.
(see [`src/test/codegen/optimize-attr-1.rs`](03a8cc7df1/src/test/codegen/optimize-attr-1.rs (L33)))

However, every relevant callsite of `declare_raw_fn` (i.e. where we
actually generate code for the function, and not e.g. a call to an
intrinsic, where optimization attributes don't [?] matter)
calls `from_fn_attrs`, so we can remove the attribute setting
from `declare_raw_fn`, and rely on `from_fn_attrs` to apply the correct
attributes all at once.

r? `@ghost` (blocked on #94221)
`@rustbot` label S-blocked
2022-03-02 08:48:33 +00:00
..
llvm-wrapper Auto merge of #94229 - erikdesjardins:rem2, r=nikic 2022-03-02 08:48:33 +00:00
src Repace use of static_nobundle with native_link_modifiers 2021-10-23 15:51:22 +02:00
build.rs Explain why libatomic is not needed on FreeBSD riscv64 2021-12-03 18:49:42 +01:00
Cargo.toml Migrate to 2021 2021-09-20 22:21:42 -04:00