about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-02-13 21:28:11 +0100
committerGitHub <noreply@github.com>2020-02-13 21:28:11 +0100
commita8a2c141ecc66274690a81e692ea982eb557e7ec (patch)
tree982285b92cd6bb1120d51110d0a5f2a34d18d081
parentc8343b8653cdb0fb6cabf588ddee2fef07635b35 (diff)
parent91b4a24219f33b7ad28b5ba147d50bc160c6f56c (diff)
downloadrust-a8a2c141ecc66274690a81e692ea982eb557e7ec.tar.gz
rust-a8a2c141ecc66274690a81e692ea982eb557e7ec.zip
Rollup merge of #69127 - tmiasko:new-pass-manager-use-after-scope, r=nikic
Enable use after scope detection in the new LLVM pass manager

Implementation of 08a1c566a792dcf9657d293155f7ada87746bb65 for the new LLVM pass manager, support for which landed in the meantime.
-rw-r--r--src/rustllvm/PassWrapper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
index 15e2251d763..8cebcaccfaa 100644
--- a/src/rustllvm/PassWrapper.cpp
+++ b/src/rustllvm/PassWrapper.cpp
@@ -761,14 +761,14 @@ LLVMRustOptimizeWithNewPassManager(
     }
 
     if (SanitizerOptions->SanitizeAddress) {
-      // FIXME: Rust does not expose the UseAfterScope option.
       PipelineStartEPCallbacks.push_back([&](ModulePassManager &MPM) {
         MPM.addPass(RequireAnalysisPass<ASanGlobalsMetadataAnalysis, Module>());
       });
       OptimizerLastEPCallbacks.push_back(
         [SanitizerOptions](FunctionPassManager &FPM, PassBuilder::OptimizationLevel Level) {
           FPM.addPass(AddressSanitizerPass(
-              /*CompileKernel=*/false, SanitizerOptions->SanitizeRecover));
+              /*CompileKernel=*/false, SanitizerOptions->SanitizeRecover,
+              /*UseAfterScope=*/true));
         }
       );
       PipelineStartEPCallbacks.push_back(