mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Small optimization of parameter attribute lookup.
llvm-svn: 44458
This commit is contained in:
parent
94d751995e
commit
97ddf89236
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user