mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
clover: Fix build after LLVM r313390
v2: pass llvm context reference instead of a pointer Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
This commit is contained in:
parent
5ef3c2bcef
commit
3115687f9b
2 changed files with 11 additions and 1 deletions
|
|
@ -198,6 +198,16 @@ namespace clover {
|
|||
f(mod.getError().message());
|
||||
#endif
|
||||
}
|
||||
|
||||
template<typename T> void
|
||||
set_diagnostic_handler(::llvm::LLVMContext &ctx,
|
||||
T *diagnostic_handler, void *data) {
|
||||
#if HAVE_LLVM >= 0x0600
|
||||
ctx.setDiagnosticHandlerCallBack(diagnostic_handler, data);
|
||||
#else
|
||||
ctx.setDiagnosticHandler(diagnostic_handler, data);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ namespace {
|
|||
create_context(std::string &r_log) {
|
||||
init_targets();
|
||||
std::unique_ptr<LLVMContext> ctx { new LLVMContext };
|
||||
ctx->setDiagnosticHandler(diagnostic_handler, &r_log);
|
||||
compat::set_diagnostic_handler(*ctx, diagnostic_handler, &r_log);
|
||||
return ctx;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue