diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-10-03 18:08:57 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-10-03 18:08:57 +0000 |
commit | 3bd59a9a061a9fbbf77851da698b2665ba581349 (patch) | |
tree | b7f58c6f067acc79006082599e705e95fd7bdbd4 /include | |
parent | 847d165459a8d4c30b57c896c7a7e2722f800f82 (diff) | |
download | llvm-3bd59a9a061a9fbbf77851da698b2665ba581349.tar.gz llvm-3bd59a9a061a9fbbf77851da698b2665ba581349.tar.bz2 llvm-3bd59a9a061a9fbbf77851da698b2665ba581349.tar.xz |
Remove assert that's too restrictive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165134 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Attributes.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h index c9589603f9..381aedf957 100644 --- a/include/llvm/Attributes.h +++ b/include/llvm/Attributes.h @@ -518,7 +518,10 @@ public: /// getParamAttributes - The attributes for the specified index are /// returned. Attributes getParamAttributes(unsigned Idx) const { - assert (Idx && Idx != ~0U && "Invalid parameter index!"); + if (Idx == 0) + return getRetAttributes(); + if (Idx == ~0U) + return getFnAttributes(); return getAttributes(Idx); } |