-/* Delete the compiler instance C. */
-
-static void
-delete_instance (struct compile_instance *c)
-{
- struct compile_c_instance *context = (struct compile_c_instance *) c;
-
- context->base.fe->ops->destroy (context->base.fe);
- htab_delete (context->type_map);
- if (context->symbol_err_map != NULL)
- htab_delete (context->symbol_err_map);
- xfree (context);
-}
-
-/* See compile-internal.h. */
-
-struct compile_instance *
-new_compile_instance (struct gcc_c_context *fe)
-{
- struct compile_c_instance *result = XCNEW (struct compile_c_instance);
-
- result->base.fe = &fe->base;
- result->base.destroy = delete_instance;
- result->base.gcc_target_options = ("-std=gnu11"
- /* Otherwise the .o file may need
- "_Unwind_Resume" and
- "__gcc_personality_v0". */
- " -fno-exceptions");
-
- result->type_map = htab_create_alloc (10, hash_type_map_instance,
- eq_type_map_instance,
- xfree, xcalloc, xfree);
-
- fe->c_ops->set_callbacks (fe, gcc_convert_symbol,
- gcc_symbol_address, result);
-
- return &result->base;
-}
+/* C plug-in wrapper. */
+
+#define FORWARD(OP,...) m_context->c_ops->OP(m_context, ##__VA_ARGS__)
+#define GCC_METHOD0(R, N) \
+ R gcc_c_plugin::N () const \
+ { return FORWARD (N); }
+#define GCC_METHOD1(R, N, A) \
+ R gcc_c_plugin::N (A a) const \
+ { return FORWARD (N, a); }
+#define GCC_METHOD2(R, N, A, B) \
+ R gcc_c_plugin::N (A a, B b) const \
+ { return FORWARD (N, a, b); }
+#define GCC_METHOD3(R, N, A, B, C) \
+ R gcc_c_plugin::N (A a, B b, C c) const \
+ { return FORWARD (N, a, b, c); }
+#define GCC_METHOD4(R, N, A, B, C, D) \
+ R gcc_c_plugin::N (A a, B b, C c, D d) const \
+ { return FORWARD (N, a, b, c, d); }
+#define GCC_METHOD5(R, N, A, B, C, D, E) \
+ R gcc_c_plugin::N (A a, B b, C c, D d, E e) const \
+ { return FORWARD (N, a, b, c, d, e); }
+#define GCC_METHOD7(R, N, A, B, C, D, E, F, G) \
+ R gcc_c_plugin::N (A a, B b, C c, D d, E e, F f, G g) const \
+ { return FORWARD (N, a, b, c, d, e, f, g); }
+
+#include "gcc-c-fe.def"
+
+#undef GCC_METHOD0
+#undef GCC_METHOD1
+#undef GCC_METHOD2
+#undef GCC_METHOD3
+#undef GCC_METHOD4
+#undef GCC_METHOD5
+#undef GCC_METHOD7
+#undef FORWARD