C/C++: Simplify handling of location information for OpenACC routine directives 76/189276/2
authortschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Aug 2016 13:35:19 +0000 (13:35 +0000)
committerMikhail Kashkarov <m.kashkarov@partner.samsung.com>
Thu, 18 Oct 2018 13:20:06 +0000 (16:20 +0300)
commit07d99c4761ee840d74b06aa565bf84930ba16d53
tree2ad0b67f7735225ddb3090e91f9af11b537278db
parent5b32d4548a28e4783a5a965dee1241f41f27a952
C/C++: Simplify handling of location information for OpenACC routine directives

gcc/c/
* c-parser.c (struct oacc_routine_data): New.
(c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
Simplify code.
(c_finish_oacc_routine): Likewise.  Don't attach clauses to "omp
declare target" attribute.
gcc/cp/
* parser.h (struct cp_omp_declare_simd_data): New.
(struct cp_parser): Use it for oacc_routine member.
* parser.c (cp_ensure_no_oacc_routine, cp_parser_oacc_routine)
(cp_parser_late_parsing_oacc_routine, cp_finalize_oacc_routine):
Use it.  Simplify code.
(cp_parser_new): Initialize all members pointing to special
parsing data structures.
(cp_parser_cilk_simd_fn_vector_attrs): Initialize
parser->cilk_simd_fn_info->clauses.
(cp_parser_omp_declare_simd): Initialize
parser->omp_declare_simd->clauses.
(cp_parser_late_parsing_omp_declare_simd): Simplify code.

upstream hash: 5f429ee2993ea1795d88c5589251c500e6e9062a
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239127 138bc75d-0d04-0410-961f-82ee72b054a4

Change-Id: I6e8b2ad2102b50798fd0fb7b373e6c4ccb17acd7
gcc/c/c-parser.c
gcc/cp/parser.c
gcc/cp/parser.h