diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-10-07 16:24:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-07 16:24:51 +0200 |
| commit | 110d289846c80393383f5e85bca5da5685d84561 (patch) | |
| tree | c434a2364af9f8094688e920a38ab1be8653e35e /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 48548c91d683fd469078ab549055fed214bb589a (diff) | |
| parent | 67a82e20cfdc6119f65ddfbfa179d0b5426ee753 (diff) | |
| download | rust-110d289846c80393383f5e85bca5da5685d84561.tar.gz rust-110d289846c80393383f5e85bca5da5685d84561.zip | |
Rollup merge of #89559 - krasimirgg:llvm-14-fatal_error_handler_t, r=nagisa
RustWrapper: adapt for LLVM API change No functional changes intended. The LLVM commit https://github.com/llvm/llvm-project/commit/e463b69736da8b0a950ecd937cf990401bdfcdeb changed an argument of fatal_error_handler_t from std::string to char*. This adapts RustWrapper accordingly.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 9850f395a0f..97114729c0a 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -54,7 +54,11 @@ static LLVM_THREAD_LOCAL char *LastError; // // Notably it exits the process with code 101, unlike LLVM's default of 1. static void FatalErrorHandler(void *UserData, +#if LLVM_VERSION_LT(14, 0) const std::string& Reason, +#else + const char* Reason, +#endif bool GenCrashDiag) { // Do the same thing that the default error handler does. std::cerr << "LLVM ERROR: " << Reason << std::endl; |
