LLVM  10.0.0svn
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 // This file declares the SanitizerCoverage class which is a port of the legacy
12 // SanitizerCoverage pass to use the new PassManager infrastructure.
13 //
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_SANITIZERCOVERAGE_H
17 #define LLVM_TRANSFORMS_INSTRUMENTATION_SANITIZERCOVERAGE_H
18 
19 #include "llvm/IR/Module.h"
20 #include "llvm/IR/PassManager.h"
22 
23 namespace llvm {
24 
25 /// This is the ModuleSanitizerCoverage pass used in the new pass manager. The
26 /// pass instruments functions for coverage, adds initialization calls to the
27 /// module for trace PC guards and 8bit counters if they are requested, and
28 /// appends globals to llvm.compiler.used.
30  : public PassInfoMixin<ModuleSanitizerCoveragePass> {
31 public:
34  : Options(Options) {}
36 
37 private:
39 };
40 
41 // Insert SanitizerCoverage instrumentation.
44 
45 } // namespace llvm
46 
47 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:65
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:372
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:153
ModuleSanitizerCoveragePass(SanitizerCoverageOptions Options=SanitizerCoverageOptions())
Module.h This file contains the declarations for the Module class.
This is the ModuleSanitizerCoverage pass used in the new pass manager.
ModulePass * createModuleSanitizerCoverageLegacyPassPass(const SanitizerCoverageOptions &Options=SanitizerCoverageOptions())
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
Definition: Pass.h:224
A container for analyses that lazily runs them and caches their results.
This header defines various interfaces for pass management in LLVM.