[llvm-commits] CVS: llvm/lib/VMCore/Type.cpp
Reid Spencer
reid at x10sys.com
Sun Dec 31 09:50:52 PST 2006
Changes in directory llvm/lib/VMCore:
Type.cpp updated: 1.153 -> 1.154
---
Log message:
Fix a bug in getParamAttrs where an invalid value would be returned if the
index passed in was out of range for the number of parameter attributes set.
---
Diffs of the changes: (+3 -3)
Type.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.153 llvm/lib/VMCore/Type.cpp:1.154
--- llvm/lib/VMCore/Type.cpp:1.153 Sat Dec 30 23:25:34 2006
+++ llvm/lib/VMCore/Type.cpp Sun Dec 31 11:50:33 2006
@@ -1015,9 +1015,9 @@
FunctionType::ParameterAttributes
FunctionType::getParamAttrs(unsigned Idx) const {
if (!ParamAttrs)
- return ParameterAttributes(0);
- if (Idx > ParamAttrs->size())
- return ParameterAttributes(0);
+ return NoAttributeSet;
+ if (Idx >= ParamAttrs->size())
+ return NoAttributeSet;
return (*ParamAttrs)[Idx];
}
More information about the llvm-commits
mailing list