LLVM  10.0.0svn
HWAddressSanitizer.h
Go to the documentation of this file.
1 //===--------- Definition of the HWAddressSanitizer class -------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the Hardware AddressSanitizer class which is a port of the
11 // legacy HWAddressSanitizer pass to use the new PassManager infrastructure.
12 //
13 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_HWADDRESSSANITIZERPASS_H
15 #define LLVM_TRANSFORMS_INSTRUMENTATION_HWADDRESSSANITIZERPASS_H
16 
17 #include "llvm/IR/Function.h"
18 #include "llvm/IR/PassManager.h"
19 
20 namespace llvm {
21 
22 /// This is a public interface to the hardware address sanitizer pass for
23 /// instrumenting code to check for various memory errors at runtime, similar to
24 /// AddressSanitizer but based on partial hardware assistance.
25 class HWAddressSanitizerPass : public PassInfoMixin<HWAddressSanitizerPass> {
26 public:
27  explicit HWAddressSanitizerPass(bool CompileKernel = false,
28  bool Recover = false);
30 
31 private:
32  bool CompileKernel;
33  bool Recover;
34 };
35 
36 FunctionPass *createHWAddressSanitizerLegacyPassPass(bool CompileKernel = false,
37  bool Recover = false);
38 
39 } // namespace llvm
40 
41 #endif
FunctionPass * createHWAddressSanitizerLegacyPassPass(bool CompileKernel=false, bool Recover=false)
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
This is a public interface to the hardware address sanitizer pass for instrumenting code to check for...
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
FunctionPass class - This class is used to implement most global optimizations.
Definition: Pass.h:284
PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM)
A container for analyses that lazily runs them and caches their results.
HWAddressSanitizerPass(bool CompileKernel=false, bool Recover=false)
This header defines various interfaces for pass management in LLVM.