1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Small optimization of parameter attribute lookup.

llvm-svn: 44458
This commit is contained in:
Duncan Sands 2007-11-30 18:20:58 +00:00
parent 94d751995e
commit 97ddf89236

View File

@ -79,7 +79,7 @@ void Argument::setParent(Function *parent) {
uint16_t
ParamAttrsList::getParamAttrs(uint16_t Index) const {
unsigned limit = attrs.size();
for (unsigned i = 0; i < limit; ++i)
for (unsigned i = 0; i < limit && attrs[i].index <= Index; ++i)
if (attrs[i].index == Index)
return attrs[i].attrs;
return ParamAttr::None;