LLVM 24.0.0git
SanitizerCoverage.h
Go to the documentation of this file.
1//===--------- Definition of the SanitizerCoverage class --------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
6// See https://llvm.org/LICENSE.txt for license information.
7// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8//
9//===----------------------------------------------------------------------===//
10//
11// SanitizerCoverage is a simple code coverage implementation.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_SANITIZERCOVERAGE_H
16#define LLVM_TRANSFORMS_INSTRUMENTATION_SANITIZERCOVERAGE_H
17
19#include "llvm/IR/PassManager.h"
24
25namespace llvm {
26class Module;
27
28/// This is the ModuleSanitizerCoverage pass used in the new pass manager. The
29/// pass instruments functions for coverage, adds initialization calls to the
30/// module for trace PC guards and 8bit counters if they are requested, and
31/// appends globals to llvm.compiler.used.
33 : public RequiredPassInfoMixin<SanitizerCoveragePass> {
34public:
38 const std::vector<std::string> &AllowlistFiles = {},
39 const std::vector<std::string> &BlocklistFiles = {});
41
42private:
45 std::unique_ptr<SpecialCaseList> Allowlist;
46 std::unique_ptr<SpecialCaseList> Blocklist;
47};
48
49} // namespace llvm
50
51#endif
#define LLVM_ABI
Definition Compiler.h:215
This header defines various interfaces for pass management in LLVM.
This file defines the RefCountedBase, ThreadSafeRefCountedBase, and IntrusiveRefCntPtr classes.
Contains the forward declaration for vfs::FileSystem, as well as the IntrusiveRefCntPtrInfo specializ...
A smart pointer to a reference-counted object that inherits from RefCountedBase or ThreadSafeRefCount...
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:68
A set of analyses that are preserved following a run of a transformation pass.
Definition Analysis.h:112
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
LLVM_ABI SanitizerCoveragePass(SanitizerCoverageOptions Options=SanitizerCoverageOptions(), IntrusiveRefCntPtr< vfs::FileSystem > VFS=nullptr, const std::vector< std::string > &AllowlistFiles={}, const std::vector< std::string > &BlocklistFiles={})
This is an optimization pass for GlobalISel generic memory operations.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
Definition MIRParser.h:39
A CRTP mix-in for passes that should not be skipped.