]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Rollup merge of #90833 - tmiasko:optimization-remarks, r=nikic
authorMatthias Krüger <matthias.krueger@famsik.de>
Sun, 28 Nov 2021 22:45:17 +0000 (23:45 +0100)
committerGitHub <noreply@github.com>
Sun, 28 Nov 2021 22:45:17 +0000 (23:45 +0100)
commit67762ffe35734c14b0aa1b90597dee164e73831a
tree9cde84b9a4477fdcba7fac9da4eefdb2ac36b759
parent9ef0bcfc6843f510027fd007a4bb2d999514e036
parent8fa45295f44febfa7035caeb149b2adfaa58fc50
Rollup merge of #90833 - tmiasko:optimization-remarks, r=nikic

Emit LLVM optimization remarks when enabled with `-Cremark`

The default diagnostic handler considers all remarks to be disabled by
default unless configured otherwise through LLVM internal flags:
`-pass-remarks`, `-pass-remarks-missed`, and `-pass-remarks-analysis`.
This behaviour makes `-Cremark` ineffective on its own.

Fix this by configuring a custom diagnostic handler that enables
optimization remarks based on the value of `-Cremark` option. With
`-Cremark=all` enabling all remarks.

Fixes #90924.

r? `@nikic`
compiler/rustc_codegen_llvm/src/llvm/ffi.rs
compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp