summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Instructions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Instructions.cpp')
-rw-r--r--llvm/lib/IR/Instructions.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index 98d37074b4a..6f60d15c52c 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/lib/IR/Instructions.cpp
@@ -355,6 +355,12 @@ void CallInst::removeAttribute(unsigned i, Attribute::AttrKind Kind) {
setAttributes(PAL);
}
+void CallInst::removeAttribute(unsigned i, StringRef Kind) {
+ AttributeSet PAL = getAttributes();
+ PAL = PAL.removeAttribute(getContext(), i, Kind);
+ setAttributes(PAL);
+}
+
void CallInst::removeAttribute(unsigned i, Attribute Attr) {
AttributeSet PAL = getAttributes();
AttrBuilder B(Attr);
@@ -390,6 +396,10 @@ Attribute CallInst::getAttribute(unsigned i, Attribute::AttrKind Kind) const {
return getAttributes().getAttribute(i, Kind);
}
+Attribute CallInst::getAttribute(unsigned i, StringRef Kind) const {
+ return getAttributes().getAttribute(i, Kind);
+}
+
bool CallInst::dataOperandHasImpliedAttr(unsigned i,
Attribute::AttrKind Kind) const {
// There are getNumOperands() - 1 data operands. The last operand is the
@@ -724,6 +734,12 @@ void InvokeInst::removeAttribute(unsigned i, Attribute::AttrKind Kind) {
setAttributes(PAL);
}
+void InvokeInst::removeAttribute(unsigned i, StringRef Kind) {
+ AttributeSet PAL = getAttributes();
+ PAL = PAL.removeAttribute(getContext(), i, Kind);
+ setAttributes(PAL);
+}
+
void InvokeInst::removeAttribute(unsigned i, Attribute Attr) {
AttributeSet PAL = getAttributes();
AttrBuilder B(Attr);
@@ -737,6 +753,10 @@ Attribute InvokeInst::getAttribute(unsigned i,
return getAttributes().getAttribute(i, Kind);
}
+Attribute InvokeInst::getAttribute(unsigned i, StringRef Kind) const {
+ return getAttributes().getAttribute(i, Kind);
+}
+
void InvokeInst::addDereferenceableAttr(unsigned i, uint64_t Bytes) {
AttributeSet PAL = getAttributes();
PAL = PAL.addDereferenceableAttr(getContext(), i, Bytes);
OpenPOWER on IntegriCloud