diff gcc/jit/libgccjit.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line diff
--- a/gcc/jit/libgccjit.h	Thu Oct 25 07:37:49 2018 +0900
+++ b/gcc/jit/libgccjit.h	Thu Feb 13 11:34:05 2020 +0900
@@ -1,5 +1,5 @@
 /* A pure C API to enable client code to embed GCC as a JIT-compiler.
-   Copyright (C) 2013-2018 Free Software Foundation, Inc.
+   Copyright (C) 2013-2020 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -325,6 +325,28 @@
 
 #define LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option
 
+/* Add an arbitrary gcc driver option to the context.
+   The context takes a copy of the string, so the
+   (const char *) optname is not needed anymore after the call
+   returns.
+
+   Note that only some options are likely to be meaningful; there is no
+   "frontend" within libgccjit, so typically only those affecting
+   assembler and linker are likely to be useful.
+
+   This entrypoint was added in LIBGCCJIT_ABI_11; you can test for
+   its presence using
+   #ifdef LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option
+*/
+extern void
+gcc_jit_context_add_driver_option (gcc_jit_context *ctxt,
+				   const char *optname);
+
+/* Pre-canned feature-test macro for detecting the presence of
+   gcc_jit_context_add_driver_option within libgccjit.h.  */
+
+#define LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option
+
 /* Compile the context to in-memory machine code.
 
    This can be called more that once on a given context,
@@ -580,6 +602,21 @@
 			   gcc_jit_type *type,
 			   const char *name);
 
+#define LIBGCCJIT_HAVE_gcc_jit_context_new_bitfield
+
+/* Create a bit field, for use within a struct or union.
+
+   This API entrypoint was added in LIBGCCJIT_ABI_12; you can test for its
+   presence using
+     #ifdef LIBGCCJIT_HAVE_gcc_jit_context_new_bitfield
+*/
+extern gcc_jit_field *
+gcc_jit_context_new_bitfield (gcc_jit_context *ctxt,
+			      gcc_jit_location *loc,
+			      gcc_jit_type *type,
+			      int width,
+			      const char *name);
+
 /* Upcasting from field to object.  */
 extern gcc_jit_object *
 gcc_jit_field_as_object (gcc_jit_field *field);