mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-26 13:10:34 +00:00
Small optimization of parameter attribute lookup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44458 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
757d243167
commit
6bb0ae4711
@ -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