diff options
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/IR/CallSite.h | 16 | ||||
-rw-r--r-- | llvm/include/llvm/IR/Instructions.h | 6 |
2 files changed, 22 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/CallSite.h b/llvm/include/llvm/IR/CallSite.h index 2bd836fd794..ad66cfbfaad 100644 --- a/llvm/include/llvm/IR/CallSite.h +++ b/llvm/include/llvm/IR/CallSite.h @@ -305,6 +305,22 @@ public: CALLSITE_DELEGATE_SETTER(setAttributes(PAL)); } + void addAttribute(unsigned i, Attribute::AttrKind attr) { + CALLSITE_DELEGATE_SETTER(addAttribute(i, attr)); + } + + void addAttribute(unsigned i, StringRef Kind, StringRef Value) { + CALLSITE_DELEGATE_SETTER(addAttribute(i, Kind, Value)); + } + + void removeAttribute(unsigned i, Attribute::AttrKind attr) { + CALLSITE_DELEGATE_SETTER(removeAttribute(i, attr)); + } + + void removeAttribute(unsigned i, Attribute attr) { + CALLSITE_DELEGATE_SETTER(removeAttribute(i, attr)); + } + /// \brief Return true if this function has the given attribute. bool hasFnAttr(Attribute::AttrKind A) const { CALLSITE_DELEGATE_GETTER(hasFnAttr(A)); diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h index 19ea3464a10..63175ed8b3f 100644 --- a/llvm/include/llvm/IR/Instructions.h +++ b/llvm/include/llvm/IR/Instructions.h @@ -1604,6 +1604,9 @@ public: void addAttribute(unsigned i, StringRef Kind, StringRef Value); /// removeAttribute - removes the attribute from the list of attributes. + void removeAttribute(unsigned i, Attribute::AttrKind attr); + + /// removeAttribute - removes the attribute from the list of attributes. void removeAttribute(unsigned i, Attribute attr); /// \brief adds the dereferenceable attribute to the list of attributes. @@ -3542,6 +3545,9 @@ public: void addAttribute(unsigned i, Attribute::AttrKind attr); /// removeAttribute - removes the attribute from the list of attributes. + void removeAttribute(unsigned i, Attribute::AttrKind attr); + + /// removeAttribute - removes the attribute from the list of attributes. void removeAttribute(unsigned i, Attribute attr); /// \brief adds the dereferenceable attribute to the list of attributes. |