summaryrefslogtreecommitdiff
path: root/libcc1/marshall-cp.hh
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-05-04 15:26:58 -0600
committerTom Tromey <tom@tromey.com>2021-05-05 00:06:16 -0600
commit25d1a6ecdc443f19d63ab4dfc449417347ca7be0 (patch)
treed7d7e3693096c36217f47ba8f9b0ebf8b0123203 /libcc1/marshall-cp.hh
parent523ca6403c68d580043af01485f2a8a8ce3a56d1 (diff)
libcc1: use templates to unmarshall enums
Now that C++11 can be used in GCC, libcc1 can be changed to use templates and type traits to handle unmarshalling all kinds of enums. libcc1 * marshall.hh (cc1_plugin::unmarshall): Use type traits. * marshall-cp.hh (cc1_plugin::unmarshall): Remove overloads. * marshall-c.hh: Remove. * libcc1plugin.cc: Update includes. * libcc1.cc: Update includes.
Diffstat (limited to 'libcc1/marshall-cp.hh')
-rw-r--r--libcc1/marshall-cp.hh40
1 files changed, 0 insertions, 40 deletions
diff --git a/libcc1/marshall-cp.hh b/libcc1/marshall-cp.hh
index ff80bfe4187..3d6ae4126ae 100644
--- a/libcc1/marshall-cp.hh
+++ b/libcc1/marshall-cp.hh
@@ -25,46 +25,6 @@ along with GCC; see the file COPYING3. If not see
namespace cc1_plugin
{
- status
- unmarshall (connection *conn, enum gcc_cp_symbol_kind *result)
- {
- protocol_int p;
- if (!unmarshall_intlike (conn, &p))
- return FAIL;
- *result = (enum gcc_cp_symbol_kind) p;
- return OK;
- }
-
- status
- unmarshall (connection *conn, enum gcc_cp_oracle_request *result)
- {
- protocol_int p;
- if (!unmarshall_intlike (conn, &p))
- return FAIL;
- *result = (enum gcc_cp_oracle_request) p;
- return OK;
- }
-
- status
- unmarshall (connection *conn, enum gcc_cp_qualifiers *result)
- {
- protocol_int p;
- if (!unmarshall_intlike (conn, &p))
- return FAIL;
- *result = (enum gcc_cp_qualifiers) p;
- return OK;
- }
-
- status
- unmarshall (connection *conn, enum gcc_cp_ref_qualifiers *result)
- {
- protocol_int p;
- if (!unmarshall_intlike (conn, &p))
- return FAIL;
- *result = (enum gcc_cp_ref_qualifiers) p;
- return OK;
- }
-
// Send a gcc_vbase_array marker followed by the array.
status
marshall (connection *conn, const gcc_vbase_array *a)