mirror of https://gitlab.freedesktop.org/mesa/mesa
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
|
@ -128,11 +128,20 @@ namespace {
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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) {
|
diagnostic_handler(const ::llvm::DiagnosticInfo &di, void *data) {
|
||||||
if (di.getSeverity() == ::llvm::DS_Error) {
|
if (di.getSeverity() == ::llvm::DS_Error) {
|
||||||
|
#endif
|
||||||
raw_string_ostream os { *reinterpret_cast<std::string *>(data) };
|
raw_string_ostream os { *reinterpret_cast<std::string *>(data) };
|
||||||
::llvm::DiagnosticPrinterRawOStream printer { os };
|
::llvm::DiagnosticPrinterRawOStream printer { os };
|
||||||
|
#if LLVM_VERSION_MAJOR >= 19
|
||||||
|
di->print(printer);
|
||||||
|
#else
|
||||||
di.print(printer);
|
di.print(printer);
|
||||||
|
#endif
|
||||||
throw build_error();
|
throw build_error();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue