diff options
| author | bors <bors@rust-lang.org> | 2021-11-12 19:28:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-11-12 19:28:04 +0000 |
| commit | e90c5fbbc5df5c81267747daeb937d4e955ce6ad (patch) | |
| tree | 8d5dfc3ab54f45746b74fe9a33d9a86d6d7c526f /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 220ed09b26177ca4b6ab525f403d251024389a41 (diff) | |
| parent | 5e7c0313976d670bbe6accdaa27347ed23aed58b (diff) | |
| download | rust-e90c5fbbc5df5c81267747daeb937d4e955ce6ad.tar.gz rust-e90c5fbbc5df5c81267747daeb937d4e955ce6ad.zip | |
Auto merge of #90836 - matthiaskrgr:rollup-ou6yrlw, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #90589 (rustc_llvm: update PassWrapper for recent LLVM) - #90644 (Extend the const swap feature) - #90704 (Unix ExitStatus comments and a tiny docs fix) - #90761 (Shorten Span of unused macro lints) - #90795 (Add more comments to explain the code to generate the search index) - #90798 (Document `unreachable!` custom panic message) - #90826 (rustc_feature: Convert `BuiltinAttribute` from tuple to a struct) 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 | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index ddbc3c59128..4f77db8a24d 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -889,15 +889,17 @@ LLVMRustOptimizeWithNewPassManager( OptimizerLastEPCallbacks.push_back( [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) { MPM.addPass(RequireAnalysisPass<ASanGlobalsMetadataAnalysis, Module>()); - MPM.addPass(ModuleAddressSanitizerPass( - /*CompileKernel=*/false, SanitizerOptions->SanitizeAddressRecover)); #if LLVM_VERSION_GE(14, 0) - AddressSanitizerOptions opts(/*CompileKernel=*/false, - SanitizerOptions->SanitizeAddressRecover, - /*UseAfterScope=*/true, - AsanDetectStackUseAfterReturnMode::Runtime); - MPM.addPass(createModuleToFunctionPassAdaptor(AddressSanitizerPass(opts))); + AddressSanitizerOptions opts = AddressSanitizerOptions{ + /*CompileKernel=*/false, + SanitizerOptions->SanitizeAddressRecover, + /*UseAfterScope=*/true, + AsanDetectStackUseAfterReturnMode::Runtime, + }; + MPM.addPass(ModuleAddressSanitizerPass(opts)); #else + MPM.addPass(ModuleAddressSanitizerPass( + /*CompileKernel=*/false, SanitizerOptions->SanitizeAddressRecover)); MPM.addPass(createModuleToFunctionPassAdaptor(AddressSanitizerPass( /*CompileKernel=*/false, SanitizerOptions->SanitizeAddressRecover, /*UseAfterScope=*/true))); |
