diff options
author | Amaury Sechet <deadalnix@gmail.com> | 2016-06-12 06:17:24 +0000 |
---|---|---|
committer | Amaury Sechet <deadalnix@gmail.com> | 2016-06-12 06:17:24 +0000 |
commit | 5db224e1f041e2d21bbf4eb0db7a1e8c0cd8439d (patch) | |
tree | d3845b46a7856215e5d20896f5371b9b039de1f6 /llvm/lib/IR/Function.cpp | |
parent | adc79395252d2c417224985833ba70acf36e8318 (diff) | |
download | bcm5719-llvm-5db224e1f041e2d21bbf4eb0db7a1e8c0cd8439d.tar.gz bcm5719-llvm-5db224e1f041e2d21bbf4eb0db7a1e8c0cd8439d.zip |
Make sure we have a Add/Remove/Has function for various thing that can have attribute.
Summary: This also deprecated the get attribute function familly.
Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael, jyknight
Subscribers: axw, joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D19181
llvm-svn: 272504
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 815922593e5..d7eaf7190c4 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -372,6 +372,12 @@ void Function::addAttribute(unsigned i, Attribute::AttrKind attr) { setAttributes(PAL); } +void Function::addAttribute(unsigned i, Attribute Attr) { + AttributeSet PAL = getAttributes(); + PAL = PAL.addAttribute(getContext(), i, Attr); + setAttributes(PAL); +} + void Function::addAttributes(unsigned i, AttributeSet attrs) { AttributeSet PAL = getAttributes(); PAL = PAL.addAttributes(getContext(), i, attrs); |