AddressSanitizerOptions.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===--------- Definition of the AddressSanitizer options -------*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. // This file defines data types used to set Address Sanitizer options.
  14. //===----------------------------------------------------------------------===//
  15. #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_ADDRESSSANITIZEROPTIONS_H
  16. #define LLVM_TRANSFORMS_INSTRUMENTATION_ADDRESSSANITIZEROPTIONS_H
  17. namespace llvm {
  18. /// Types of ASan module destructors supported
  19. enum class AsanDtorKind {
  20. None, ///< Do not emit any destructors for ASan
  21. Global, ///< Append to llvm.global_dtors
  22. Invalid, ///< Not a valid destructor Kind.
  23. };
  24. /// Types of ASan module constructors supported
  25. enum class AsanCtorKind {
  26. None,
  27. Global
  28. };
  29. /// Mode of ASan detect stack use after return
  30. enum class AsanDetectStackUseAfterReturnMode {
  31. Never, ///< Never detect stack use after return.
  32. Runtime, ///< Detect stack use after return if not disabled runtime with
  33. ///< (ASAN_OPTIONS=detect_stack_use_after_return=0).
  34. Always, ///< Always detect stack use after return.
  35. Invalid, ///< Not a valid detect mode.
  36. };
  37. } // namespace llvm
  38. #endif
  39. #ifdef __GNUC__
  40. #pragma GCC diagnostic pop
  41. #endif