From 5e204486a7dd1e5f7e14e941a2c7e707a8ad1a3b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 25 Apr 2009 18:44:54 +0000 Subject: [PATCH] accept an ignore the no_instrument_function attribute. Since we don't support -pg, we never instrument :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70061 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Parse/AttributeList.h | 1 + lib/Parse/AttributeList.cpp | 2 ++ lib/Sema/SemaDeclAttr.cpp | 1 + 3 files changed, 4 insertions(+) diff --git a/include/clang/Parse/AttributeList.h b/include/clang/Parse/AttributeList.h index b585838df8..6f4e2f2a08 100644 --- a/include/clang/Parse/AttributeList.h +++ b/include/clang/Parse/AttributeList.h @@ -70,6 +70,7 @@ public: AT_mode, AT_nodebug, AT_noinline, + AT_no_instrument_function, AT_nonnull, AT_noreturn, AT_nothrow, diff --git a/lib/Parse/AttributeList.cpp b/lib/Parse/AttributeList.cpp index 8048db887d..a9c552ba17 100644 --- a/lib/Parse/AttributeList.cpp +++ b/lib/Parse/AttributeList.cpp @@ -139,6 +139,8 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo *Name) { case 22: if (!memcmp(Str, "objc_ownership_returns", 22)) return AT_objc_ownership_returns; + if (!memcmp(Str, "no_instrument_function", 22)) + return AT_no_instrument_function; break; } return UnknownAttribute; diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index add12e53c2..8843d92c5c 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -1617,6 +1617,7 @@ static void ProcessDeclAttribute(Decl *D, const AttributeList &Attr, Sema &S) { case AttributeList::AT_noinline: HandleNoinlineAttr (D, Attr, S); break; case AttributeList::AT_regparm: HandleRegparmAttr (D, Attr, S); break; case AttributeList::IgnoredAttribute: + case AttributeList::AT_no_instrument_function: // Interacts with -pg. // Just ignore break; default: -- 2.50.1