diff options
author | Duncan Sands <baldrick@free.fr> | 2007-11-30 18:20:58 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2007-11-30 18:20:58 +0000 |
commit | d4d7f9d69edb413abcea0909747ee5bc14867a1f (patch) | |
tree | 1097bbe82fe494b6c704439d5604d11d1b6b78a1 /llvm/lib/VMCore/Function.cpp | |
parent | b41f872013d566326a89659414302fda97d9b71a (diff) | |
download | bcm5719-llvm-d4d7f9d69edb413abcea0909747ee5bc14867a1f.tar.gz bcm5719-llvm-d4d7f9d69edb413abcea0909747ee5bc14867a1f.zip |
Small optimization of parameter attribute lookup.
llvm-svn: 44458
Diffstat (limited to 'llvm/lib/VMCore/Function.cpp')
-rw-r--r-- | llvm/lib/VMCore/Function.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp index 16728f6a0ca..37949559aaf 100644 --- a/llvm/lib/VMCore/Function.cpp +++ b/llvm/lib/VMCore/Function.cpp @@ -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; |