flags.h 975 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //===-- flags.h -------------------------------------------------*- 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. #ifndef SCUDO_FLAGS_H_
  9. #define SCUDO_FLAGS_H_
  10. #include "internal_defs.h"
  11. namespace scudo {
  12. struct Flags {
  13. #define SCUDO_FLAG(Type, Name, DefaultValue, Description) Type Name;
  14. #include "flags.inc"
  15. #undef SCUDO_FLAG
  16. #ifdef GWP_ASAN_HOOKS
  17. #define GWP_ASAN_OPTION(Type, Name, DefaultValue, Description) \
  18. Type GWP_ASAN_##Name;
  19. #include "gwp_asan/options.inc"
  20. #undef GWP_ASAN_OPTION
  21. #endif // GWP_ASAN_HOOKS
  22. void setDefaults();
  23. };
  24. Flags *getFlags();
  25. void initFlags();
  26. class FlagParser;
  27. void registerFlags(FlagParser *Parser, Flags *F);
  28. } // namespace scudo
  29. #endif // SCUDO_FLAGS_H_