aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorJosh Triplett <josht@vnet.ibm.com>2006-06-29 17:57:35 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-05 15:36:31 -0700
commita68a1da82ee9eca8ecfa0996ab73b3e7e90f7aac (patch)
tree184c816e1cc7e6e68a0095aad9d7cca81dd0c450
parent8731bb7b2e6229a4fe2234796d0371d01cc22835 (diff)
downloadsparse-dev-a68a1da82ee9eca8ecfa0996ab73b3e7e90f7aac.tar.gz
[PATCH] Ignore no_instrument_function attributes
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@freedesktop.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--ident-list.h1
-rw-r--r--parse.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/ident-list.h b/ident-list.h
index 4381a4bd..95bb96ac 100644
--- a/ident-list.h
+++ b/ident-list.h
@@ -54,6 +54,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 43396578..c536ec2d 100644
--- a/parse.c
+++ b/parse.c
@@ -517,6 +517,9 @@ static const char * handle_attribute(struct ctype *ctype, struct ident *attribut
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;