aboutsummaryrefslogtreecommitdiff
path: root/gcc/jit/jit-playback.h
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2023-08-29 11:32:09 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2023-08-29 11:32:12 -0400
commit29763b002459cba64fa76a6965046792944de41d (patch)
treef5c7c538f99c3453c6a9c36786c87a8b1d6156fe /gcc/jit/jit-playback.h
parent4b70c7c849331d45c0d6a1a4e1cf96b103be9aa6 (diff)
downloadgcc-29763b002459cba64fa76a6965046792944de41d.zip
gcc-29763b002459cba64fa76a6965046792944de41d.tar.gz
gcc-29763b002459cba64fa76a6965046792944de41d.tar.bz2
libgccjit: add support for `restrict` attribute on function parameters
gcc/jit/Changelog: * jit-playback.cc: Remove trailing whitespace characters. * jit-playback.h: Add get_restrict method. * jit-recording.cc: Add get_restrict methods. * jit-recording.h: Add get_restrict methods. * libgccjit++.h: Add get_restrict methods. * libgccjit.cc: Add gcc_jit_type_get_restrict. * libgccjit.h: Declare gcc_jit_type_get_restrict. * libgccjit.map: Declare gcc_jit_type_get_restrict. gcc/testsuite/ChangeLog: * jit.dg/test-restrict.c: Add test for __restrict__ attribute. * jit.dg/all-non-failing-tests.h: Add test-restrict.c to the list. gcc/jit/ChangeLog: * docs/topics/compatibility.rst: Add documentation for LIBGCCJIT_ABI_25. * docs/topics/types.rst: Add documentation for gcc_jit_type_get_restrict. Signed-off-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
Diffstat (limited to 'gcc/jit/jit-playback.h')
-rw-r--r--gcc/jit/jit-playback.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/jit/jit-playback.h b/gcc/jit/jit-playback.h
index 883159f..438f395 100644
--- a/gcc/jit/jit-playback.h
+++ b/gcc/jit/jit-playback.h
@@ -446,6 +446,11 @@ public:
return new type (build_qualified_type (m_inner, TYPE_QUAL_VOLATILE));
}
+ type *get_restrict () const
+ {
+ return new type (build_qualified_type (m_inner, TYPE_QUAL_RESTRICT));
+ }
+
type *get_aligned (size_t alignment_in_bytes) const;
type *get_vector (size_t num_units) const;