EntryExitInstrumenterPass(/*PostInlining=*/false)));
});
- if (CodeGenOpts.SanitizeCoverageType ||
- CodeGenOpts.SanitizeCoverageIndirectCalls ||
- CodeGenOpts.SanitizeCoverageTraceCmp) {
- auto SancovOpts = getSancovOptsFromCGOpts(CodeGenOpts);
- PB.registerPipelineStartEPCallback(
- [SancovOpts](ModulePassManager &MPM) {
- MPM.addPass(ModuleSanitizerCoveragePass(SancovOpts));
- });
- }
-
// Register callbacks to schedule sanitizer passes at the appropriate part of
// the pipeline.
// FIXME: either handle asan/the remaining sanitizers or error out
}
}
+ if (CodeGenOpts.SanitizeCoverageType ||
+ CodeGenOpts.SanitizeCoverageIndirectCalls ||
+ CodeGenOpts.SanitizeCoverageTraceCmp) {
+ auto SancovOpts = getSancovOptsFromCGOpts(CodeGenOpts);
+ MPM.addPass(ModuleSanitizerCoveragePass(SancovOpts));
+ }
+
if (LangOpts.Sanitize.has(SanitizerKind::HWAddress)) {
bool Recover = CodeGenOpts.SanitizeRecover.has(SanitizerKind::HWAddress);
MPM.addPass(HWAddressSanitizerPass(
}
if (CodeGenOpts.OptimizationLevel == 0) {
- if (CodeGenOpts.SanitizeCoverageType ||
- CodeGenOpts.SanitizeCoverageIndirectCalls ||
- CodeGenOpts.SanitizeCoverageTraceCmp) {
- auto SancovOpts = getSancovOptsFromCGOpts(CodeGenOpts);
- MPM.addPass(ModuleSanitizerCoveragePass(SancovOpts));
- }
-
addSanitizersAtO0(MPM, TargetTriple, LangOpts, CodeGenOpts);
}
}