From d512d93b50ce31537b2d05615b5c553c07a6ebdb Mon Sep 17 00:00:00 2001 From: Maximilian Downey Twiss <creatorsmithmdt@gmail.com> Date: Fri, 18 Nov 2022 14:33:35 +1100 Subject: [PATCH 30/56] java: Add handle_nonnull_attribute function.
gcc/java/ChangeLog: * lang.cc (handle_nonnull_attribute): Add. (java_eh_personality): Adjust. --- gcc/java/lang.cc | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/gcc/java/lang.cc b/gcc/java/lang.cc index 65025eeeb72..0353f6f3b95 100644 --- a/gcc/java/lang.cc +++ b/gcc/java/lang.cc @@ -57,6 +57,7 @@ static bool java_decl_ok_for_sibcall (const_tree); static enum classify_record java_classify_record (tree type); static tree java_eh_personality (void); +static tree handle_nonnull_attribute (tree *, tree, tree, int, bool *); #ifndef TARGET_OBJECT_SUFFIX # define TARGET_OBJECT_SUFFIX ".o" @@ -65,9 +66,9 @@ static tree java_eh_personality (void); /* Table of machine-independent attributes. */ const struct attribute_spec java_attribute_table[] = { - { "nonnull", 0, -1, false, true, true, - NULL, false }, - { NULL, 0, 0, false, false, false, NULL, false } + { "nonnull", 0, -1, false, true, true, false, + handle_nonnull_attribute, NULL }, + { NULL, 0, 0, false, false, false, false, NULL, NULL } }; /* Used to avoid printing error messages with bogus function @@ -909,4 +910,15 @@ java_eh_personality (void) return java_eh_personality_decl; } +/* Handle the "nonnull" attribute. + FIXME: Implement an actual function here. */ + +static tree +handle_nonnull_attribute + (tree ARG_UNUSED (*node), tree ARG_UNUSED (name), tree ARG_UNUSED (args), + int ARG_UNUSED (flags), bool ARG_UNUSED (*no_add_attrs)) +{ + return NULL_TREE; +} + #include "gt-java-lang.h" -- 2.38.1