add Function::removeFnAttr()
authorKostya Serebryany <kcc@google.com>
Fri, 21 Jun 2013 07:38:09 +0000 (07:38 +0000)
committerKostya Serebryany <kcc@google.com>
Fri, 21 Jun 2013 07:38:09 +0000 (07:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184536 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/Function.h

index f97929f658548d6b5a059804e1854f20ee65b660..06455393d0c93e08227499be54a8d4384947e396 100644 (file)
@@ -181,6 +181,13 @@ public:
                                              AttributeSet::FunctionIndex, N));
   }
 
+  /// removeFnAttr - Remove function attributes from this function.
+  ///
+  void removeFnAttr(Attribute::AttrKind N) {
+    setAttributes(AttributeSets.removeAttribute(
+        getContext(), AttributeSet::FunctionIndex, N));
+  }
+
   /// addFnAttr - Add function attributes to this function.
   ///
   void addFnAttr(StringRef Kind) {