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