mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-07 03:20:28 +01:00
fix(FTBFS): clover: adapt to new LLVM 19 DiagnosticHandlerTy
LLVM 19 changed DiagnosticHandlerTy. Adapt to that.
Reference: 44d037cc25
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28520>
This commit is contained in:
parent
1c3cce2fff
commit
50783351bc
1 changed files with 9 additions and 0 deletions
|
|
@ -128,11 +128,20 @@ namespace {
|
|||
}
|
||||
|
||||
void
|
||||
#if LLVM_VERSION_MAJOR >= 19
|
||||
diagnostic_handler(const ::llvm::DiagnosticInfo *di, void *data) {
|
||||
if (di->getSeverity() == ::llvm::DS_Error) {
|
||||
#else
|
||||
diagnostic_handler(const ::llvm::DiagnosticInfo &di, void *data) {
|
||||
if (di.getSeverity() == ::llvm::DS_Error) {
|
||||
#endif
|
||||
raw_string_ostream os { *reinterpret_cast<std::string *>(data) };
|
||||
::llvm::DiagnosticPrinterRawOStream printer { os };
|
||||
#if LLVM_VERSION_MAJOR >= 19
|
||||
di->print(printer);
|
||||
#else
|
||||
di.print(printer);
|
||||
#endif
|
||||
throw build_error();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue