Ignore the GCC attributes no_instrument_function and __no_instrument_function__, used to turn off instrumentation for a particular function when using GCC's -finstrument-functions option. Signed-off-by: Josh Triplett <josh@xxxxxxxxxxxxxxx> --- The Linux -rt tree uses this attribute, so sparse needs this fix in order to run on the -rt tree. ident-list.h | 1 + parse.c | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-) 9e44d55ae6c0371da2fae5bd8c9ca38860e7b221 diff --git a/ident-list.h b/ident-list.h index 3051e56..798a9ac 100644 --- a/ident-list.h +++ b/ident-list.h @@ -53,6 +53,7 @@ IDENT(noinline); IDENT(deprecated); IDENT(__const); IDENT(__const__); IDENT(noreturn); IDENT(__noreturn__); IDENT(regparm); IDENT(weak); IDENT(__weak__); +IDENT(__no_instrument_function__); IDENT(no_instrument_function); IDENT(__sentinel__); IDENT(sentinel); IDENT(alias); IDENT(pure); IDENT(always_inline); IDENT(syscall_linkage); IDENT(visibility); diff --git a/parse.c b/parse.c index 4339657..c536ec2 100644 --- a/parse.c +++ b/parse.c @@ -517,6 +517,9 @@ static const char * handle_attribute(str if (attribute == &noreturn_ident || attribute == &__noreturn___ident) return NULL; + if (attribute == &no_instrument_function_ident || + attribute == &__no_instrument_function___ident) + return NULL; if (attribute == &sentinel_ident || attribute == &__sentinel___ident) return NULL; - To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html