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

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* A pure C API to enable client code to embed GCC as a JIT-compiler. 1 /* A pure C API to enable client code to embed GCC as a JIT-compiler.
2 Copyright (C) 2013-2018 Free Software Foundation, Inc. 2 Copyright (C) 2013-2020 Free Software Foundation, Inc.
3 3
4 This file is part of GCC. 4 This file is part of GCC.
5 5
6 GCC is free software; you can redistribute it and/or modify it 6 GCC is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by 7 under the terms of the GNU General Public License as published by
323 /* Pre-canned feature-test macro for detecting the presence of 323 /* Pre-canned feature-test macro for detecting the presence of
324 gcc_jit_context_add_command_line_option within libgccjit.h. */ 324 gcc_jit_context_add_command_line_option within libgccjit.h. */
325 325
326 #define LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option 326 #define LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option
327 327
328 /* Add an arbitrary gcc driver option to the context.
329 The context takes a copy of the string, so the
330 (const char *) optname is not needed anymore after the call
331 returns.
332
333 Note that only some options are likely to be meaningful; there is no
334 "frontend" within libgccjit, so typically only those affecting
335 assembler and linker are likely to be useful.
336
337 This entrypoint was added in LIBGCCJIT_ABI_11; you can test for
338 its presence using
339 #ifdef LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option
340 */
341 extern void
342 gcc_jit_context_add_driver_option (gcc_jit_context *ctxt,
343 const char *optname);
344
345 /* Pre-canned feature-test macro for detecting the presence of
346 gcc_jit_context_add_driver_option within libgccjit.h. */
347
348 #define LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option
349
328 /* Compile the context to in-memory machine code. 350 /* Compile the context to in-memory machine code.
329 351
330 This can be called more that once on a given context, 352 This can be called more that once on a given context,
331 although any errors that occur will block further compilation. */ 353 although any errors that occur will block further compilation. */
332 354
577 extern gcc_jit_field * 599 extern gcc_jit_field *
578 gcc_jit_context_new_field (gcc_jit_context *ctxt, 600 gcc_jit_context_new_field (gcc_jit_context *ctxt,
579 gcc_jit_location *loc, 601 gcc_jit_location *loc,
580 gcc_jit_type *type, 602 gcc_jit_type *type,
581 const char *name); 603 const char *name);
604
605 #define LIBGCCJIT_HAVE_gcc_jit_context_new_bitfield
606
607 /* Create a bit field, for use within a struct or union.
608
609 This API entrypoint was added in LIBGCCJIT_ABI_12; you can test for its
610 presence using
611 #ifdef LIBGCCJIT_HAVE_gcc_jit_context_new_bitfield
612 */
613 extern gcc_jit_field *
614 gcc_jit_context_new_bitfield (gcc_jit_context *ctxt,
615 gcc_jit_location *loc,
616 gcc_jit_type *type,
617 int width,
618 const char *name);
582 619
583 /* Upcasting from field to object. */ 620 /* Upcasting from field to object. */
584 extern gcc_jit_object * 621 extern gcc_jit_object *
585 gcc_jit_field_as_object (gcc_jit_field *field); 622 gcc_jit_field_as_object (gcc_jit_field *field);
586 623