Mercurial > hg > CbC > CbC_gcc
comparison gcc/opth-gen.awk @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 # Copyright (C) 2003-2017 Free Software Foundation, Inc. | 1 # Copyright (C) 2003-2018 Free Software Foundation, Inc. |
2 # Contributed by Kelley Cook, June 2004. | 2 # Contributed by Kelley Cook, June 2004. |
3 # Original code from Neil Booth, May 2003. | 3 # Original code from Neil Booth, May 2003. |
4 # | 4 # |
5 # This program is free software; you can redistribute it and/or modify it | 5 # This program is free software; you can redistribute it and/or modify it |
6 # under the terms of the GNU General Public License as published by the | 6 # under the terms of the GNU General Public License as published by the |
306 print "extern hashval_t cl_target_option_hash (const struct cl_target_option *);"; | 306 print "extern hashval_t cl_target_option_hash (const struct cl_target_option *);"; |
307 print ""; | 307 print ""; |
308 print "/* Hash optimization from a structure. */"; | 308 print "/* Hash optimization from a structure. */"; |
309 print "extern hashval_t cl_optimization_hash (const struct cl_optimization *);"; | 309 print "extern hashval_t cl_optimization_hash (const struct cl_optimization *);"; |
310 print ""; | 310 print ""; |
311 print "/* Compare two optimization options. */"; | |
312 print "extern bool cl_optimization_option_eq (cl_optimization const *ptr1, cl_optimization const *ptr2);" | |
313 print ""; | |
311 print "/* Generator files may not have access to location_t, and don't need these. */" | 314 print "/* Generator files may not have access to location_t, and don't need these. */" |
312 print "#if defined(UNKNOWN_LOCATION)" | 315 print "#if defined(UNKNOWN_LOCATION)" |
313 print "bool " | 316 print "bool " |
314 print "common_handle_option_auto (struct gcc_options *opts, " | 317 print "common_handle_option_auto (struct gcc_options *opts, " |
315 print " struct gcc_options *opts_set, " | 318 print " struct gcc_options *opts_set, " |
318 print " location_t loc, " | 321 print " location_t loc, " |
319 print " const struct cl_option_handlers *handlers, " | 322 print " const struct cl_option_handlers *handlers, " |
320 print " diagnostic_context *dc); " | 323 print " diagnostic_context *dc); " |
321 for (i = 0; i < n_langs; i++) { | 324 for (i = 0; i < n_langs; i++) { |
322 lang_name = lang_sanitized_name(langs[i]); | 325 lang_name = lang_sanitized_name(langs[i]); |
323 print "bool " | 326 print "bool" |
324 print lang_name "_handle_option_auto (struct gcc_options *opts, " | 327 print lang_name "_handle_option_auto (struct gcc_options *opts," |
325 print " struct gcc_options *opts_set, " | 328 print " struct gcc_options *opts_set," |
326 print " size_t scode, const char *arg, int value, " | 329 print " size_t scode, const char *arg," |
327 print " unsigned int lang_mask, int kind, " | 330 print " HOST_WIDE_INT value," |
328 print " location_t loc, " | 331 print " unsigned int lang_mask, int kind," |
329 print " const struct cl_option_handlers *handlers, " | 332 print " location_t loc," |
330 print " diagnostic_context *dc); " | 333 print " const struct cl_option_handlers *handlers," |
334 print " diagnostic_context *dc);" | |
331 } | 335 } |
332 print "void cpp_handle_option_auto (const struct gcc_options * opts, size_t scode," | 336 print "void cpp_handle_option_auto (const struct gcc_options * opts, size_t scode," |
333 print " struct cpp_options * cpp_opts);" | 337 print " struct cpp_options * cpp_opts);" |
334 print "void init_global_opts_from_cpp(struct gcc_options * opts, " | 338 print "void init_global_opts_from_cpp(struct gcc_options * opts, " |
335 print " const struct cpp_options * cpp_opts);" | 339 print " const struct cpp_options * cpp_opts);" |
487 } | 491 } |
488 | 492 |
489 print " N_OPTS," | 493 print " N_OPTS," |
490 print " OPT_SPECIAL_unknown," | 494 print " OPT_SPECIAL_unknown," |
491 print " OPT_SPECIAL_ignore," | 495 print " OPT_SPECIAL_ignore," |
496 print " OPT_SPECIAL_deprecated," | |
492 print " OPT_SPECIAL_program_name," | 497 print " OPT_SPECIAL_program_name," |
493 print " OPT_SPECIAL_input_file" | 498 print " OPT_SPECIAL_input_file" |
494 print "};" | 499 print "};" |
495 print "" | 500 print "" |
496 print "#ifdef GCC_C_COMMON_C" | 501 print "#ifdef GCC_C_COMMON_C" |
497 print "/* Mapping from cpp message reasons to the options that enable them. */" | 502 print "/* Mapping from cpp message reasons to the options that enable them. */" |
498 print "#include <cpplib.h>" | 503 print "#include <cpplib.h>" |
499 print "struct cpp_reason_option_codes_t" | 504 print "struct cpp_reason_option_codes_t" |
500 print "{" | 505 print "{" |
501 print " const int reason; /* cpplib message reason. */" | 506 print " /* cpplib message reason. */" |
502 print " const int option_code; /* gcc option that controls this message. */" | 507 print " const enum cpp_warning_reason reason;" |
508 print " /* gcc option that controls this message. */" | |
509 print " const int option_code;" | |
503 print "};" | 510 print "};" |
504 print "" | 511 print "" |
505 print "static const struct cpp_reason_option_codes_t cpp_reason_option_codes[] = {" | 512 print "static const struct cpp_reason_option_codes_t cpp_reason_option_codes[] = {" |
506 for (i = 0; i < n_opts; i++) { | 513 for (i = 0; i < n_opts; i++) { |
507 # With identical flags, pick only the last one. The | 514 # With identical flags, pick only the last one. The |