1 | //===- RealtimeSanitizer.h - RealtimeSanitizer instrumentation --*- C++ -*-===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | // |
9 | // This file is a part of the RealtimeSanitizer, an LLVM transformation for |
10 | // detecting and reporting realtime safety violations. |
11 | // |
12 | // The instrumentation pass inserts calls to __rtsan_realtime_enter and |
13 | // __rtsan_realtime_exit at the entry and exit points of functions that are |
14 | // marked with the appropriate attribute. |
15 | // |
16 | // See also: llvm-project/compiler-rt/lib/rtsan/ |
17 | // |
18 | //===----------------------------------------------------------------------===// |
19 | #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_REALTIMESANITIZER_H |
20 | #define LLVM_TRANSFORMS_INSTRUMENTATION_REALTIMESANITIZER_H |
21 | |
22 | #include "llvm/IR/PassManager.h" |
23 | #include "llvm/Support/Compiler.h" |
24 | |
25 | namespace llvm { |
26 | |
27 | /// Create ctor and init functions. |
28 | struct RealtimeSanitizerPass : public PassInfoMixin<RealtimeSanitizerPass> { |
29 | LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); |
30 | static bool isRequired() { return true; } |
31 | }; |
32 | |
33 | } // namespace llvm |
34 | |
35 | #endif // LLVM_TRANSFORMS_INSTRUMENTATION_REALTIMESANITIZER_H |
36 | |