[yaml2obj/obj2yaml] - Add support for .stack_sizes sections.
[llvm-complete.git] / include / llvm / Transforms / Instrumentation / HWAddressSanitizer.h
blobe3104eeb1d360d83e49d30d8ddecc56ed79c3847
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.
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"
20 namespace llvm {
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);
29 PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM);
31 private:
32 bool CompileKernel;
33 bool Recover;
36 FunctionPass *createHWAddressSanitizerLegacyPassPass(bool CompileKernel = false,
37 bool Recover = false);
39 } // namespace llvm
41 #endif