AddressSanitizerOptions.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. // TODO(dliew): Add more more kinds.
  24. };
  25. /// Mode of ASan detect stack use after return
  26. enum class AsanDetectStackUseAfterReturnMode {
  27. Never, ///< Never detect stack use after return.
  28. Runtime, ///< Detect stack use after return if runtime flag is enabled
  29. ///< (ASAN_OPTIONS=detect_stack_use_after_return=1)
  30. Always, ///< Always detect stack use after return.
  31. Invalid, ///< Not a valid detect mode.
  32. };
  33. } // namespace llvm
  34. #endif
  35. #ifdef __GNUC__
  36. #pragma GCC diagnostic pop
  37. #endif