1 //===--------- Definition of the HWAddressSanitizer class -------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the Hardware AddressSanitizer class which is a port of the
11 // legacy HWAddressSanitizer pass to use the new PassManager infrastructure.
13 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_HWADDRESSSANITIZERPASS_H
15 #define LLVM_TRANSFORMS_INSTRUMENTATION_HWADDRESSSANITIZERPASS_H
17 #include "llvm/IR/Function.h"
18 #include "llvm/IR/PassManager.h"
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
> {
27 explicit HWAddressSanitizerPass(bool CompileKernel
= false,
28 bool Recover
= false);
29 PreservedAnalyses
run(Module
&M
, ModuleAnalysisManager
&MAM
);
36 FunctionPass
*createHWAddressSanitizerLegacyPassPass(bool CompileKernel
= false,
37 bool Recover
= false);