summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-10-03 18:08:57 +0000
committerBill Wendling <isanbard@gmail.com>2012-10-03 18:08:57 +0000
commiteef9b8a1b54806866b8d4b6197d479f29d9b245e (patch)
tree8c52e01b5b9eda72f0a764b3ea2ace218cfca304
parent4a67508685abee7b8d3ebbca6b1144d2c7ead211 (diff)
downloadbcm5719-llvm-eef9b8a1b54806866b8d4b6197d479f29d9b245e.tar.gz
bcm5719-llvm-eef9b8a1b54806866b8d4b6197d479f29d9b245e.zip
Remove assert that's too restrictive.
llvm-svn: 165134
-rw-r--r--llvm/include/llvm/Attributes.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/include/llvm/Attributes.h b/llvm/include/llvm/Attributes.h
index c9589603f9a..381aedf9570 100644
--- a/llvm/include/llvm/Attributes.h
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud