diff options
| author | bors <bors@rust-lang.org> | 2022-09-08 21:45:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-08 21:45:23 +0000 |
| commit | c6861df8368a35ef3814e0c379754bb4c7013401 (patch) | |
| tree | 103fc61b4a0f96e886ab225e01492bf964f6b1d9 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 1120c5e01df508de64fe6642f22fadeb574afd6d (diff) | |
| parent | e43cf3deebad3dbcbbf9bae36d9a3798d73e327d (diff) | |
| download | rust-c6861df8368a35ef3814e0c379754bb4c7013401.tar.gz rust-c6861df8368a35ef3814e0c379754bb4c7013401.zip | |
Auto merge of #101592 - compiler-errors:rollup-d2fya7z, r=compiler-errors
Rollup of 7 pull requests
Successful merges:
- #101423 (Fix hermit warnings)
- #101499 (Introduce lowering_arena to avoid creating AST nodes on the fly)
- #101530 (llvm-wrapper: adapt for LLVM API changes)
- #101554 (rustdoc: remove unused CSS `#implementations-list > h3 > span.in-band`)
- #101580 (rustdoc: remove unused CSS `div.impl-items > div`)
- #101584 (rustdoc: remove no-op CSS `#settings-menu { padding: 0 }`)
- #101587 (Make `Debug` impl for `Term` useful)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 05d2a214d0b..bc49dfe7eae 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -936,12 +936,14 @@ LLVMRustOptimizeWithNewPassManager( /*CompileKernel=*/false); OptimizerLastEPCallbacks.push_back( [Options](ModulePassManager &MPM, OptimizationLevel Level) { -#if LLVM_VERSION_GE(14, 0) +#if LLVM_VERSION_GE(14, 0) && LLVM_VERSION_LT(16, 0) MPM.addPass(ModuleMemorySanitizerPass(Options)); #else MPM.addPass(MemorySanitizerPass(Options)); #endif +#if LLVM_VERSION_LT(16, 0) MPM.addPass(createModuleToFunctionPassAdaptor(MemorySanitizerPass(Options))); +#endif } ); } @@ -972,8 +974,12 @@ LLVMRustOptimizeWithNewPassManager( /*UseAfterScope=*/true, AsanDetectStackUseAfterReturnMode::Runtime, }; +#if LLVM_VERSION_LT(16, 0) MPM.addPass(ModuleAddressSanitizerPass(opts)); #else + MPM.addPass(AddressSanitizerPass(opts)); +#endif +#else MPM.addPass(ModuleAddressSanitizerPass( /*CompileKernel=*/false, SanitizerOptions->SanitizeAddressRecover)); MPM.addPass(createModuleToFunctionPassAdaptor(AddressSanitizerPass( |
