names.hh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* String declarations.
  2. Copyright (C) 2014 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. #ifndef CC1_PLUGIN_NAMES_HH
  16. #define CC1_PLUGIN_NAMES_HH
  17. namespace cc1_plugin
  18. {
  19. // This code defines global string constants, one for each method in
  20. // gcc-c-fe.def. This is needed so that they can be used as
  21. // template arguments elsewhere.
  22. #define GCC_METHOD0(R, N) \
  23. extern const char *N;
  24. #define GCC_METHOD1(R, N, A) \
  25. extern const char *N;
  26. #define GCC_METHOD2(R, N, A, B) \
  27. extern const char *N;
  28. #define GCC_METHOD3(R, N, A, B, C) \
  29. extern const char *N;
  30. #define GCC_METHOD4(R, N, A, B, C, D) \
  31. extern const char *N;
  32. #define GCC_METHOD5(R, N, A, B, C, D, E) \
  33. extern const char *N;
  34. #define GCC_METHOD7(R, N, A, B, C, D, E, F, G) \
  35. extern const char *N;
  36. #include "gcc-c-fe.def"
  37. #undef GCC_METHOD0
  38. #undef GCC_METHOD1
  39. #undef GCC_METHOD2
  40. #undef GCC_METHOD3
  41. #undef GCC_METHOD4
  42. #undef GCC_METHOD5
  43. #undef GCC_METHOD7
  44. };
  45. #endif // CC1_PLUGIN_NAMES_HH