diff options
author | AndreaCorallo <andrea.corallo@arm.com> | 2020-03-08 13:46:33 +0000 |
---|---|---|
committer | Andrea Corallo <andrea.corallo@arm.com> | 2020-03-31 20:57:15 +0200 |
commit | 63b2923dc6f57e74d964a9cf14f4ba595ab14ed9 (patch) | |
tree | 03f4850f666021f4378a87062e2900281dd852ef /gcc/jit/libgccjit.h | |
parent | 689418b97e5eb6a221871a2439bca3e6283ac579 (diff) | |
download | gcc-63b2923dc6f57e74d964a9cf14f4ba595ab14ed9.zip gcc-63b2923dc6f57e74d964a9cf14f4ba595ab14ed9.tar.gz gcc-63b2923dc6f57e74d964a9cf14f4ba595ab14ed9.tar.bz2 |
libgccjit: add new version entry point
gcc/jit/ChangeLog
2020-03-31 Andrea Corallo <andrea.corallo@arm.com>
David Malcolm <dmalcolm@redhat.com>
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_13): New ABI tag
plus add version paragraph.
* libgccjit++.h (namespace gccjit::version): Add new namespace.
* libgccjit.c (gcc_jit_version_major, gcc_jit_version_minor)
(gcc_jit_version_patchlevel): New functions.
* libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_version): New macro.
(gcc_jit_version_major, gcc_jit_version_minor)
(gcc_jit_version_patchlevel): New functions.
* libgccjit.map (LIBGCCJIT_ABI_13) New ABI tag.
gcc/testsuite/ChangeLog
2020-03-31 Andrea Corallo <andrea.corallo@arm.com>
* jit.dg/test-version.c: New testcase.
* jit.dg/all-non-failing-tests.h: Add test-version.c.
Diffstat (limited to 'gcc/jit/libgccjit.h')
-rw-r--r-- | gcc/jit/libgccjit.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h index 21a0dc0..1c5a12e 100644 --- a/gcc/jit/libgccjit.h +++ b/gcc/jit/libgccjit.h @@ -1487,6 +1487,22 @@ gcc_jit_context_new_rvalue_from_vector (gcc_jit_context *ctxt, size_t num_elements, gcc_jit_rvalue **elements); +#define LIBGCCJIT_HAVE_gcc_jit_version + +/* Functions to retrive libgccjit version. + Analogous to __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__ in C code. + + These API entrypoints were added in LIBGCCJIT_ABI_13; you can test for their + presence using + #ifdef LIBGCCJIT_HAVE_gcc_jit_version + */ +extern int +gcc_jit_version_major (void); +extern int +gcc_jit_version_minor (void); +extern int +gcc_jit_version_patchlevel (void); + #ifdef __cplusplus } #endif /* __cplusplus */ |