Skip to content

Commit a8a2c14

Browse files
authored
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 08a1c56 for the new LLVM pass manager, support for which landed in the meantime.
2 parents c8343b8 + 91b4a24 commit a8a2c14

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)