diff options
Diffstat (limited to 'backend/src/llvm/llvm_to_gen.cpp')
-rw-r--r-- | backend/src/llvm/llvm_to_gen.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/src/llvm/llvm_to_gen.cpp b/backend/src/llvm/llvm_to_gen.cpp index 7f7deffe..d4570bb4 100644 --- a/backend/src/llvm/llvm_to_gen.cpp +++ b/backend/src/llvm/llvm_to_gen.cpp @@ -322,7 +322,11 @@ namespace gbe DataLayout DL(&mod); gbeDiagnosticContext dc; +#if LLVM_VERSION_MAJOR >= 6 + mod.getContext().setDiagnosticHandlerCallBack(&gbeDiagnosticHandler,&dc); +#else mod.getContext().setDiagnosticHandler(&gbeDiagnosticHandler,&dc); +#endif #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 37 mod.setDataLayout(DL); |