Skip to content

Commit 91b4a24

Browse files
committedFeb 13, 2020
Enable use after scope detection in the new LLVM pass manager
Implementation of 08a1c56 for the new LLVM pass manager, support for which landed in the meantime.
1 parent 2e6eace commit 91b4a24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/rustllvm/PassWrapper.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -761,14 +761,14 @@ LLVMRustOptimizeWithNewPassManager(
761761
}
762762

763763
if (SanitizerOptions->SanitizeAddress) {
764-
// FIXME: Rust does not expose the UseAfterScope option.
765764
PipelineStartEPCallbacks.push_back([&](ModulePassManager &MPM) {
766765
MPM.addPass(RequireAnalysisPass<ASanGlobalsMetadataAnalysis, Module>());
767766
});
768767
OptimizerLastEPCallbacks.push_back(
769768
[SanitizerOptions](FunctionPassManager &FPM, PassBuilder::OptimizationLevel Level) {
770769
FPM.addPass(AddressSanitizerPass(
771-
/*CompileKernel=*/false, SanitizerOptions->SanitizeRecover));
770+
/*CompileKernel=*/false, SanitizerOptions->SanitizeRecover,
771+
/*UseAfterScope=*/true));
772772
}
773773
);
774774
PipelineStartEPCallbacks.push_back(

0 commit comments

Comments
 (0)
Please sign in to comment.