diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-02 18:30:13 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-02 18:30:13 +0000 |
commit | a303c417bbdb53703c2c17398b08486bde78f1f6 (patch) | |
tree | 98366d6b93d863cefdc53f16c66c0c5ae7fb2261 /lib/IR/Function.cpp | |
parent | 12f3ca4cdb95b193af905a00e722a4dcb40b3de3 (diff) |
Notes
Diffstat (limited to 'lib/IR/Function.cpp')
-rw-r--r-- | lib/IR/Function.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/IR/Function.cpp b/lib/IR/Function.cpp index e1f5fdea44e4..fc61ba7439ba 100644 --- a/lib/IR/Function.cpp +++ b/lib/IR/Function.cpp @@ -84,8 +84,7 @@ bool Argument::hasByValOrInAllocaAttr() const { unsigned Argument::getParamAlignment() const { assert(getType()->isPointerTy() && "Only pointers have alignments"); - return getParent()->getParamAlignment(getArgNo()+1); - + return getParent()->getParamAlignment(getArgNo()); } uint64_t Argument::getDereferenceableBytes() const { @@ -152,15 +151,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); } |