params-enum.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* params-enums.h - Run-time parameter enums.
  2. Copyright (C) 2015-2019 Free Software Foundation, Inc.
  3. This file is part of GCC.
  4. GCC is free software; you can redistribute it and/or modify it under
  5. the terms of the GNU General Public License as published by the Free
  6. Software Foundation; either version 3, or (at your option) any later
  7. version.
  8. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  9. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  11. for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GCC; see the file COPYING3. If not see
  14. <http://www.gnu.org/licenses/>. */
  15. #define DEFPARAM(ENUM, OPTION, HELP, DEFAULT, MIN, MAX)
  16. #define DEFPARAMENUMNAME(ENUM) ENUM ## _KIND
  17. #define DEFPARAMENUMVAL(ENUM, V) ENUM ## _KIND_ ## V
  18. #define DEFPARAMENUMTERM(ENUM) ENUM ## _KIND_ ## LAST
  19. #define DEFPARAMENUM5(ENUM, OPTION, HELP, DEFAULT, V0, V1, V2, V3, V4) \
  20. enum DEFPARAMENUMNAME (ENUM) \
  21. { \
  22. DEFPARAMENUMVAL (ENUM, V0), \
  23. DEFPARAMENUMVAL (ENUM, V1), \
  24. DEFPARAMENUMVAL (ENUM, V2), \
  25. DEFPARAMENUMVAL (ENUM, V3), \
  26. DEFPARAMENUMVAL (ENUM, V4), \
  27. DEFPARAMENUMTERM (ENUM) \
  28. };
  29. #include "params.def"
  30. #undef DEFPARAMENUM5
  31. #undef DEFPARAMENUMTERM
  32. #undef DEFPARAMENUMVAL
  33. #undef DEFPARAMENUMNAME
  34. #undef DEFPARAM