[llvm-commits] [llvm] r165134 - /llvm/trunk/include/llvm/Attributes.h

Bill Wendling isanbard at gmail.com
Wed Oct 3 11:08:57 PDT 2012


Author: void
Date: Wed Oct  3 13:08:57 2012
New Revision: 165134

URL: http://llvm.org/viewvc/llvm-project?rev=165134&view=rev
Log:
Remove assert that's too restrictive.

Modified:
    llvm/trunk/include/llvm/Attributes.h

Modified: llvm/trunk/include/llvm/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=165134&r1=165133&r2=165134&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Attributes.h (original)
+++ llvm/trunk/include/llvm/Attributes.h Wed Oct  3 13:08:57 2012
@@ -518,7 +518,10 @@
   /// 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);
   }
 





More information about the llvm-commits mailing list