From a8aa66513176c8efe23c3b04b1623f7ecc2fe35c Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 28 Apr 2017 17:58:18 +0000 Subject: [PATCH] [IR] Delete unused Argument::removeAttr overload 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 --- include/llvm/IR/Argument.h | 2 -- lib/IR/Function.cpp | 9 --------- 2 files changed, 11 deletions(-) diff --git a/include/llvm/IR/Argument.h b/include/llvm/IR/Argument.h index 5c05f19abc1..5ed6d030c98 100644 --- a/include/llvm/IR/Argument.h +++ b/include/llvm/IR/Argument.h @@ -115,8 +115,6 @@ public: 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. diff --git a/lib/IR/Function.cpp b/lib/IR/Function.cpp index e1f5fdea44e..12f52a3a892 100644 --- a/lib/IR/Function.cpp +++ b/lib/IR/Function.cpp @@ -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); } -- 2.40.0