]> granicus.if.org Git - clang/commitdiff
accept an ignore the no_instrument_function attribute. Since we don't
authorChris Lattner <sabre@nondot.org>
Sat, 25 Apr 2009 18:44:54 +0000 (18:44 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 25 Apr 2009 18:44:54 +0000 (18:44 +0000)
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
lib/Parse/AttributeList.cpp
lib/Sema/SemaDeclAttr.cpp

index b585838df8399236b1ef4dd4ed1659edbeeb16da..6f4e2f2a08c44ff2fa1c8cf742b726f5f1dd125f 100644 (file)
@@ -70,6 +70,7 @@ public:
     AT_mode,
     AT_nodebug,
     AT_noinline,
+    AT_no_instrument_function,
     AT_nonnull,
     AT_noreturn,
     AT_nothrow,
index 8048db887de533f59dab052b629599cad1978e14..a9c552ba179c66200fc4d9a450f716a27da056d9 100644 (file)
@@ -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;
index add12e53c26f29412943a588387b0e56228e672e..8843d92c5cae35f41663729c84d53e7cb83fdb46 100644 (file)
@@ -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: