Skip to content

Commit

Permalink
[IR] Delete unused Argument::removeAttr overload
Browse files Browse the repository at this point in the history
It doesn't make sense to remove an AttributeList from an argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301663 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
rnk committed Apr 28, 2017
1 parent 2a5bddd commit a8aa665
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions include/llvm/IR/Argument.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ class Argument : public Value {
void addAttr(Attribute Attr);

/// Remove attributes from an argument.
void removeAttr(AttributeList AS);

void removeAttr(Attribute::AttrKind Kind);

/// Check if an argument has a given attribute.
Expand Down
9 changes: 0 additions & 9 deletions lib/IR/Function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,6 @@ void Argument::addAttr(Attribute Attr) {
getParent()->addAttribute(getArgNo() + 1, Attr);
}

void Argument::removeAttr(AttributeList AS) {
assert(AS.getNumSlots() <= 1 &&
"Trying to remove more than one attribute set from an argument!");
AttrBuilder B(AS, AS.getSlotIndex(0));
getParent()->removeAttributes(
getArgNo() + 1,
AttributeList::get(Parent->getContext(), getArgNo() + 1, B));
}

void Argument::removeAttr(Attribute::AttrKind Kind) {
getParent()->removeAttribute(getArgNo() + 1, Kind);
}
Expand Down

0 comments on commit a8aa665

Please sign in to comment.