forked from OSchip/llvm-project
[NFC][sancov] Rename ModuleSanitizerCoveragePass
This commit is contained in:
parent
5e38b2a456
commit
4c18670776
|
@ -627,7 +627,7 @@ static void addSanitizers(const Triple &TargetTriple,
|
|||
OptimizationLevel Level) {
|
||||
if (CodeGenOpts.hasSanitizeCoverage()) {
|
||||
auto SancovOpts = getSancovOptsFromCGOpts(CodeGenOpts);
|
||||
MPM.addPass(ModuleSanitizerCoveragePass(
|
||||
MPM.addPass(SanitizerCoveragePass(
|
||||
SancovOpts, CodeGenOpts.SanitizeCoverageAllowlistFiles,
|
||||
CodeGenOpts.SanitizeCoverageIgnorelistFiles));
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
// RUN: %clang -target x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm -flto -o - | FileCheck %s
|
||||
// RUN: %clang -O2 -target x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm -flto -o - | FileCheck %s
|
||||
|
||||
// Verify that -fsanitize-coverage invokes ModuleSanitizerCoveragePass instrumentation.
|
||||
// Verify that -fsanitize-coverage invokes SanitizerCoveragePass instrumentation.
|
||||
|
||||
int foo(int *a) { return *a; }
|
||||
// CHECK: _sancov_
|
||||
|
|
|
@ -27,10 +27,9 @@ class Module;
|
|||
/// pass instruments functions for coverage, adds initialization calls to the
|
||||
/// module for trace PC guards and 8bit counters if they are requested, and
|
||||
/// appends globals to llvm.compiler.used.
|
||||
class ModuleSanitizerCoveragePass
|
||||
: public PassInfoMixin<ModuleSanitizerCoveragePass> {
|
||||
class SanitizerCoveragePass : public PassInfoMixin<SanitizerCoveragePass> {
|
||||
public:
|
||||
explicit ModuleSanitizerCoveragePass(
|
||||
explicit SanitizerCoveragePass(
|
||||
SanitizerCoverageOptions Options = SanitizerCoverageOptions(),
|
||||
const std::vector<std::string> &AllowlistFiles =
|
||||
std::vector<std::string>(),
|
||||
|
|
|
@ -121,7 +121,7 @@ MODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass())
|
|||
MODULE_PASS("dfsan", DataFlowSanitizerPass())
|
||||
MODULE_PASS("module-inline", ModuleInlinerPass())
|
||||
MODULE_PASS("tsan-module", ModuleThreadSanitizerPass())
|
||||
MODULE_PASS("sancov-module", ModuleSanitizerCoveragePass())
|
||||
MODULE_PASS("sancov-module", SanitizerCoveragePass())
|
||||
MODULE_PASS("memprof-module", ModuleMemProfilerPass())
|
||||
MODULE_PASS("poison-checking", PoisonCheckingPass())
|
||||
MODULE_PASS("pseudo-probe-update", PseudoProbeUpdatePass())
|
||||
|
|
|
@ -280,8 +280,8 @@ private:
|
|||
};
|
||||
} // namespace
|
||||
|
||||
PreservedAnalyses ModuleSanitizerCoveragePass::run(Module &M,
|
||||
ModuleAnalysisManager &MAM) {
|
||||
PreservedAnalyses SanitizerCoveragePass::run(Module &M,
|
||||
ModuleAnalysisManager &MAM) {
|
||||
ModuleSanitizerCoverage ModuleSancov(Options, Allowlist.get(),
|
||||
Blocklist.get());
|
||||
auto &FAM = MAM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager();
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
; RUN: -sanitizer-coverage-level=3 %s -S -o - | FileCheck %s
|
||||
|
||||
; The edge between %entry and %for.inc.i is a critical edge.
|
||||
; ModuleSanitizerCoveragePass must split this critical edge in order to track
|
||||
; coverage of this edge. ModuleSanitizerCoveragePass will also insert calls to
|
||||
; SanitizerCoveragePass must split this critical edge in order to track
|
||||
; coverage of this edge. SanitizerCoveragePass will also insert calls to
|
||||
; @__sanitizer_cov_trace_pc using the debug location from the predecessor's
|
||||
; branch. but, if the branch itself is missing debug info (say, by accident
|
||||
; due to a bug in an earlier transform), we would fail a verifier check that
|
||||
|
|
Loading…
Reference in New Issue