diff options
| author | Amaury Sechet <deadalnix@gmail.com> | 2016-06-15 17:50:39 +0000 |
|---|---|---|
| committer | Amaury Sechet <deadalnix@gmail.com> | 2016-06-15 17:50:39 +0000 |
| commit | 6100adfeb541b6bdb27cd0f6f58cbe70c754fc04 (patch) | |
| tree | 315ea358751051499d3b26c57665ce738cddb42b /llvm/lib/IR/Function.cpp | |
| parent | cd5fe14d89e895b068eab56c77f5a7de3930e041 (diff) | |
| download | bcm5719-llvm-6100adfeb541b6bdb27cd0f6f58cbe70c754fc04.tar.gz bcm5719-llvm-6100adfeb541b6bdb27cd0f6f58cbe70c754fc04.zip | |
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
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
| -rw-r--r-- | llvm/lib/IR/Function.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index b71e1baf1e9..07b21151e60 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -390,6 +390,12 @@ void Function::removeAttribute(unsigned i, Attribute::AttrKind Kind) { 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); |

