Skip to content

Commit

Permalink
fixup! [PATCH] Add support for restrict attribute on function param…
Browse files Browse the repository at this point in the history
…eters

add missing `is_pointer` check in `gcc_jit_type_get_restrict`
  • Loading branch information
GuillaumeGomez committed Aug 29, 2023
1 parent 94f1362 commit c4d7ad5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gcc/jit/libgccjit.cc
Expand Up @@ -549,6 +549,7 @@ gcc_jit_type *
gcc_jit_type_get_restrict (gcc_jit_type *type)
{
RETURN_NULL_IF_FAIL (type, NULL, NULL, "NULL type");
RETURN_NULL_IF_FAIL (type->is_pointer (), NULL, NULL, "not a pointer type");

return (gcc_jit_type *)type->get_restrict ();
}
Expand Down

0 comments on commit c4d7ad5

Please sign in to comment.