| 1 | //===----------------------------------------------------------------------===// |
| 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 | #ifndef LLVM_LIB_TRANSFORMS_INSTRUMENTATION_INSTRUMENTATIONOPTIONS_H |
| 10 | #define LLVM_LIB_TRANSFORMS_INSTRUMENTATION_INSTRUMENTATIONOPTIONS_H |
| 11 | |
| 12 | #include "llvm/Analysis/BlockFrequencyInfo.h" |
| 13 | #include "llvm/ProfileData/ProfCorrelatorKind.h" |
| 14 | #include "llvm/Transforms/Instrumentation/AddressSanitizerOptions.h" |
| 15 | #include <optional> |
| 16 | |
| 17 | namespace llvm { |
| 18 | // Mode for selecting how to insert frame record info into the stack ring |
| 19 | // buffer. |
| 20 | enum class RecordStackHistoryMode { |
| 21 | // Do not record frame record info. |
| 22 | none, |
| 23 | |
| 24 | // Insert instructions into the prologue for storing into the stack ring |
| 25 | // buffer directly. |
| 26 | instr, |
| 27 | |
| 28 | // Add a call to __hwasan_add_frame_record in the runtime. |
| 29 | libcall, |
| 30 | }; |
| 31 | } // namespace llvm |
| 32 | |
| 33 | #define OPTIONS_STRUCT_DECL |
| 34 | #include "InstrumentationOptions.inc" |
| 35 | |
| 36 | #endif // LLVM_LIB_TRANSFORMS_INSTRUMENTATION_INSTRUMENTATIONOPTIONS_H |
| 37 | |