diff options
author | Martin Sebor <msebor@redhat.com> | 2021-08-31 11:13:29 -0600 |
---|---|---|
committer | Martin Sebor <msebor@redhat.com> | 2021-08-31 11:13:29 -0600 |
commit | e45d5b6bf1bcf9fd16c3ecfadb9bde69f890b28d (patch) | |
tree | 0cb54c17c2952c7238b02b5d5cfdc3f284fe29a3 | |
parent | 1cacdef0d1a3f587691735d1822d584b68eba593 (diff) | |
download | gcc-e45d5b6bf1bcf9fd16c3ecfadb9bde69f890b28d.zip gcc-e45d5b6bf1bcf9fd16c3ecfadb9bde69f890b28d.tar.gz gcc-e45d5b6bf1bcf9fd16c3ecfadb9bde69f890b28d.tar.bz2 |
Add attribute returns nonnull to get_range_query.
gcc/ChangeLog:
* function.h (function): Add comments.
(get_range_query): Same. Add attribute returns nonnull.
-rw-r--r-- | gcc/function.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/function.h b/gcc/function.h index 0db5177..36003e7 100644 --- a/gcc/function.h +++ b/gcc/function.h @@ -312,7 +312,8 @@ struct GTY(()) function { /* Range query mechanism for functions. The default is to pick up global ranges. If a pass wants on-demand ranges OTOH, it must - call enable/disable_ranger(). */ + call enable/disable_ranger(). The pointer is never null. It + should be queried by calling get_range_query(). */ range_query * GTY ((skip)) x_range_query; /* Last statement uid. */ @@ -719,10 +720,10 @@ extern const char *current_function_name (void); extern void used_types_insert (tree); /* Returns the currently active range access class. When there is no active - range class, global ranges are used. */ + range class, global ranges are used. Never returns null. */ -inline range_query * -get_range_query (struct function *fun) +ATTRIBUTE_RETURNS_NONNULL inline range_query * +get_range_query (const struct function *fun) { return fun->x_range_query; } |