From: Bill Wendling Date: Wed, 3 Oct 2012 18:08:57 +0000 (+0000) Subject: Remove assert that's too restrictive. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3bd59a9a061a9fbbf77851da698b2665ba581349;p=oota-llvm.git Remove assert that's too restrictive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165134 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h index c9589603f9a..381aedf9570 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); }