1 //===--------- Definition of the AddressSanitizer options -------*- 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 // This file defines data types used to set Address Sanitizer options. 9 //===----------------------------------------------------------------------===// 10 #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_ADDRESSSANITIZEROPTIONS_H 11 #define LLVM_TRANSFORMS_INSTRUMENTATION_ADDRESSSANITIZEROPTIONS_H 12 13 namespace llvm { 14 15 /// Types of ASan module destructors supported 16 enum class AsanDtorKind { 17 None, ///< Do not emit any destructors for ASan 18 Global, ///< Append to llvm.global_dtors 19 Invalid, ///< Not a valid destructor Kind. 20 }; 21 22 /// Mode of ASan detect stack use after return 23 enum class AsanDetectStackUseAfterReturnMode { 24 Never, ///< Never detect stack use after return. 25 Runtime, ///< Detect stack use after return if not disabled runtime with 26 ///< (ASAN_OPTIONS=detect_stack_use_after_return=0). 27 Always, ///< Always detect stack use after return. 28 Invalid, ///< Not a valid detect mode. 29 }; 30 31 } // namespace llvm 32 33 #endif 34