Skip to content

Conversation

@GuillaumeGomez
Copy link
Member

No description provided.

Comment on lines +493 to +496
type *get_restrict () const
{
return new type (build_qualified_type (m_inner, TYPE_QUAL_RESTRICT));
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure how relevant this is to libgccjit, but we got patches "rejected" because of implementations in header files, despite having existing implementations in the same header file. I see that get_aligned and get_vector are declared here, so I assume there's a corresponding jit-playback.cc file where the implementation could live? just a little nit but it could help get the patch approved on the GCC side

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the information! I'll give a try like this and if needed, I'll move the function in the source file. But for the time being, for coherency I'll leave it here. :)

gcc_jit_type_as_object;
gcc_jit_type_get_const;
gcc_jit_type_get_pointer;
gcc_jit_type_get_restrict;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in a new API section, at the end.

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.

Signed-off-by: Guillaume Gomez <[email protected]>
@antoyo antoyo merged commit d931e8d into rust-lang:master Aug 17, 2023
@GuillaumeGomez GuillaumeGomez deleted the restrict branch August 17, 2023 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants