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 08a1c566a7 for the new LLVM pass manager, support for which landed in the meantime.
This commit is contained in:
commit
a8a2c141ec
1 changed files with 2 additions and 2 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue