Add support for string attributes in the C API.
Summary: As per title. This completes the C API Attribute support.
Reviewers: Wallbraker, whitequark, echristo, rafael, jyknight
Subscribers: mehdi_amini
Differential Revision: http://reviews.llvm.org/D21365
llvm-svn: 272811
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index b71e1ba..07b2115 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -390,6 +390,12 @@
setAttributes(PAL);
}
+void Function::removeAttribute(unsigned i, StringRef Kind) {
+ AttributeSet PAL = getAttributes();
+ PAL = PAL.removeAttribute(getContext(), i, Kind);
+ setAttributes(PAL);
+}
+
void Function::removeAttributes(unsigned i, AttributeSet Attrs) {
AttributeSet PAL = getAttributes();
PAL = PAL.removeAttributes(getContext(), i, Attrs);