remove remark filtering on the rust side
now that remarks are filtered before cg_llvm's diagnostic handler callback is called, we don't need to do the filtering post c++-to-rust conversion of the diagnostic.
This commit is contained in:
parent
77d01103a3
commit
ca5a383fb6
1 changed files with 16 additions and 23 deletions
|
@ -382,12 +382,6 @@ unsafe extern "C" fn diagnostic_handler(info: &DiagnosticInfo, user: *mut c_void
|
|||
}
|
||||
|
||||
llvm::diagnostic::Optimization(opt) => {
|
||||
let enabled = match cgcx.remark {
|
||||
Passes::All => true,
|
||||
Passes::Some(ref v) => v.iter().any(|s| *s == opt.pass_name),
|
||||
};
|
||||
|
||||
if enabled {
|
||||
diag_handler.emit_note(FromLlvmOptimizationDiag {
|
||||
filename: &opt.filename,
|
||||
line: opt.line,
|
||||
|
@ -405,7 +399,6 @@ unsafe extern "C" fn diagnostic_handler(info: &DiagnosticInfo, user: *mut c_void
|
|||
message: &opt.message,
|
||||
});
|
||||
}
|
||||
}
|
||||
llvm::diagnostic::PGO(diagnostic_ref) | llvm::diagnostic::Linker(diagnostic_ref) => {
|
||||
let message = llvm::build_string(|s| {
|
||||
llvm::LLVMRustWriteDiagnosticInfoToString(diagnostic_ref, s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue