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:
parent
2e6eaceede
commit
91b4a24219
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