diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-02-21 19:46:51 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-02-21 19:46:51 +0000 |
commit | efbbbfd3847254f01f4eed60cc240f7127ae396a (patch) | |
tree | 175db68cfd96400ade6306816d64ca96b43e81c9 /llvm/lib/IR/Function.cpp | |
parent | 5ea6a89e522bb5455c809954259a0862daacb4a8 (diff) | |
download | llvm-efbbbfd3847254f01f4eed60cc240f7127ae396a.zip llvm-efbbbfd3847254f01f4eed60cc240f7127ae396a.tar.gz llvm-efbbbfd3847254f01f4eed60cc240f7127ae396a.tar.bz2 |
Don't assert on empty attributes.
llvm-svn: 175785
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r-- | llvm/lib/IR/Function.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index 15c05e7..5c444d2 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -125,7 +125,7 @@ bool Argument::hasStructRetAttr() const { /// addAttr - Add attributes to an argument. void Argument::addAttr(AttributeSet AS) { - assert(AS.getNumSlots() == 1 && + assert(AS.getNumSlots() <= 1 && "Trying to add more than one attribute set to an argument!"); AttrBuilder B(AS, AS.getSlotIndex(0)); getParent()->addAttributes(getArgNo() + 1, @@ -135,7 +135,7 @@ void Argument::addAttr(AttributeSet AS) { /// removeAttr - Remove attributes from an argument. void Argument::removeAttr(AttributeSet AS) { - assert(AS.getNumSlots() == 1 && + 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, |