[llvm] r184536 - add Function::removeFnAttr()

Kostya Serebryany kcc at google.com
Fri Jun 21 00:38:09 PDT 2013


Author: kcc
Date: Fri Jun 21 02:38:09 2013
New Revision: 184536

URL: http://llvm.org/viewvc/llvm-project?rev=184536&view=rev
Log:
add Function::removeFnAttr()

Modified:
    llvm/trunk/include/llvm/IR/Function.h

Modified: llvm/trunk/include/llvm/IR/Function.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Function.h?rev=184536&r1=184535&r2=184536&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Function.h (original)
+++ llvm/trunk/include/llvm/IR/Function.h Fri Jun 21 02:38:09 2013
@@ -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) {





More information about the llvm-commits mailing list