aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2022-02-17 12:46:57 +0100
committerThomas Schwinge <thomas@codesourcery.com>2022-03-12 11:05:29 +0100
commit828335beb77676acffb5911e575672cb55beb2e9 (patch)
treefc053dc2a1bb8517efff2aa6c4377278644e2a17 /gcc/c-family
parent72c243017dee611bf3c32ea7bfad6ac538021aaf (diff)
downloadgcc-828335beb77676acffb5911e575672cb55beb2e9.zip
gcc-828335beb77676acffb5911e575672cb55beb2e9.tar.gz
gcc-828335beb77676acffb5911e575672cb55beb2e9.tar.bz2
Add 'gcc/tree.cc:user_omp_clause_code_name' [PR65095]
Re PR65095 "Adapt OpenMP diagnostic messages for OpenACC", move C/C++ front end 'gcc/c-family/c-omp.cc:c_omp_map_clause_name' to generic 'gcc/tree.cc:user_omp_clause_code_name' . No functional change. PR other/65095 gcc/ * tree-core.h (user_omp_claus_code_name): Declare function. * tree.cc (user_omp_clause_code_name): New function. gcc/c/ * c-typeck.cc (handle_omp_array_sections_1) (c_oacc_check_attachments): Call 'user_omp_clause_code_name' instead of 'c_omp_map_clause_name'. gcc/cp/ * semantics.cc (handle_omp_array_sections_1) (cp_oacc_check_attachments): Call 'user_omp_clause_code_name' instead of 'c_omp_map_clause_name'. gcc/c-family/ * c-common.h (c_omp_map_clause_name): Remove. * c-omp.cc (c_omp_map_clause_name): Remove.
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/c-common.h1
-rw-r--r--gcc/c-family/c-omp.cc33
2 files changed, 0 insertions, 34 deletions
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index a8d6f82..5f0b5d9 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -1250,7 +1250,6 @@ extern enum omp_clause_default_kind c_omp_predetermined_sharing (tree);
extern enum omp_clause_defaultmap_kind c_omp_predetermined_mapping (tree);
extern tree c_omp_check_context_selector (location_t, tree);
extern void c_omp_mark_declare_variant (location_t, tree, tree);
-extern const char *c_omp_map_clause_name (tree, bool);
extern void c_omp_adjust_map_clauses (tree, bool);
enum c_omp_directive_kind {
diff --git a/gcc/c-family/c-omp.cc b/gcc/c-family/c-omp.cc
index cd9d866..777cdc6 100644
--- a/gcc/c-family/c-omp.cc
+++ b/gcc/c-family/c-omp.cc
@@ -2996,39 +2996,6 @@ c_omp_predetermined_mapping (tree decl)
}
-/* For OpenACC, the OMP_CLAUSE_MAP_KIND of an OMP_CLAUSE_MAP is used internally
- to distinguish clauses as seen by the user. Return the "friendly" clause
- name for error messages etc., where possible. See also
- c/c-parser.cc:c_parser_oacc_data_clause and
- cp/parser.cc:cp_parser_oacc_data_clause. */
-
-const char *
-c_omp_map_clause_name (tree clause, bool oacc)
-{
- if (oacc && OMP_CLAUSE_CODE (clause) == OMP_CLAUSE_MAP)
- switch (OMP_CLAUSE_MAP_KIND (clause))
- {
- case GOMP_MAP_FORCE_ALLOC:
- case GOMP_MAP_ALLOC: return "create";
- case GOMP_MAP_FORCE_TO:
- case GOMP_MAP_TO: return "copyin";
- case GOMP_MAP_FORCE_FROM:
- case GOMP_MAP_FROM: return "copyout";
- case GOMP_MAP_FORCE_TOFROM:
- case GOMP_MAP_TOFROM: return "copy";
- case GOMP_MAP_RELEASE: return "delete";
- case GOMP_MAP_FORCE_PRESENT: return "present";
- case GOMP_MAP_ATTACH: return "attach";
- case GOMP_MAP_FORCE_DETACH:
- case GOMP_MAP_DETACH: return "detach";
- case GOMP_MAP_DEVICE_RESIDENT: return "device_resident";
- case GOMP_MAP_LINK: return "link";
- case GOMP_MAP_FORCE_DEVICEPTR: return "deviceptr";
- default: break;
- }
- return omp_clause_code_name[OMP_CLAUSE_CODE (clause)];
-}
-
/* Used to merge map clause information in c_omp_adjust_map_clauses. */
struct map_clause
{