about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2020-02-13 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2020-02-13 00:00:00 +0000
commit91b4a24219f33b7ad28b5ba147d50bc160c6f56c (patch)
tree81b2726496257baeea1bf37bfd28c982056916c1
parent2e6eaceedeeda764056eb0e2134735793533770d (diff)
downloadrust-91b4a24219f33b7ad28b5ba147d50bc160c6f56c.tar.gz
rust-91b4a24219f33b7ad28b5ba147d50bc160c6f56c.zip
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(