diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-25 18:44:54 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-25 18:44:54 +0000 |
commit | 5e204486a7dd1e5f7e14e941a2c7e707a8ad1a3b (patch) | |
tree | 826c7703251ed4569e88eefbc418c8e8a203ba2b | |
parent | 84bb944dee0cc102635b162c669f99c529c60c02 (diff) |
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
-rw-r--r-- | include/clang/Parse/AttributeList.h | 1 | ||||
-rw-r--r-- | lib/Parse/AttributeList.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 1 |
3 files changed, 4 insertions, 0 deletions
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: |