diff options
| author | bors <bors@rust-lang.org> | 2022-09-09 06:24:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-09 06:24:25 +0000 |
| commit | 4a09adf99fff9b009ff517b9cf5bfce363130e16 (patch) | |
| tree | 401c2e64b2f18f4a3679e8d2d0aac5282f5166d3 /compiler/rustc_llvm/llvm-wrapper | |
| parent | ab32548539ec38a939c1b58599249f3b54130026 (diff) | |
| parent | 8b78fa055e8fc79023334d1a3b32094fb64eb0b6 (diff) | |
| download | rust-4a09adf99fff9b009ff517b9cf5bfce363130e16.tar.gz rust-4a09adf99fff9b009ff517b9cf5bfce363130e16.zip | |
Auto merge of #101603 - matthiaskrgr:rollup-8y6kf20, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #99207 (Enable eager checks for memory sanitizer) - #101253 (fix the suggestion of format for asm_sub_register) - #101450 (Add `const_extern_fn` to 1.62 release notes.) - #101556 (Tweak future opaque ty pretty printing) - #101563 (Link UEFI target documentation from target list) - #101593 (Cleanup themes (tooltip)) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index bc49dfe7eae..24e18826048 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -134,7 +134,12 @@ extern "C" LLVMPassRef LLVMRustCreateMemorySanitizerPass(int TrackOrigins, bool const bool CompileKernel = false; return wrap(createMemorySanitizerLegacyPassPass( - MemorySanitizerOptions{TrackOrigins, Recover, CompileKernel})); +#if LLVM_VERSION_GE(14, 0) + MemorySanitizerOptions{TrackOrigins, Recover, CompileKernel, /*EagerChecks=*/true} +#else + MemorySanitizerOptions{TrackOrigins, Recover, CompileKernel} +#endif + )); #else report_fatal_error("Legacy PM not supported with LLVM 15"); #endif @@ -930,10 +935,18 @@ LLVMRustOptimizeWithNewPassManager( if (SanitizerOptions) { if (SanitizerOptions->SanitizeMemory) { +#if LLVM_VERSION_GE(14, 0) + MemorySanitizerOptions Options( + SanitizerOptions->SanitizeMemoryTrackOrigins, + SanitizerOptions->SanitizeMemoryRecover, + /*CompileKernel=*/false, + /*EagerChecks=*/true); +#else MemorySanitizerOptions Options( SanitizerOptions->SanitizeMemoryTrackOrigins, SanitizerOptions->SanitizeMemoryRecover, /*CompileKernel=*/false); +#endif OptimizerLastEPCallbacks.push_back( [Options](ModulePassManager &MPM, OptimizationLevel Level) { #if LLVM_VERSION_GE(14, 0) && LLVM_VERSION_LT(16, 0) |
