librustc_llvm: Show PGO diagnostics properly.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
aaeb40ab3b
commit
a95c8c66a7
4 changed files with 16 additions and 2 deletions
|
|
@ -498,8 +498,13 @@ unsafe extern "C" fn diagnostic_handler(info: DiagnosticInfoRef, user: *mut c_vo
|
|||
opt.message));
|
||||
}
|
||||
}
|
||||
|
||||
_ => (),
|
||||
llvm::diagnostic::PGO(diagnostic_ref) => {
|
||||
let msg = llvm::build_string(|s| {
|
||||
llvm::LLVMRustWriteDiagnosticInfoToString(diagnostic_ref, s)
|
||||
}).expect("non-UTF8 PGO diagnostic");
|
||||
diag_handler.note_without_error(&msg);
|
||||
}
|
||||
llvm::diagnostic::UnknownDiagnostic(..) => {},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue