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 | 6bb0ae47111f5b5f351e702e696fca7551cc3d30 (patch) | |
tree | 21f27dec41f7af5bcbf55f4d1b0bbd1196ad1343 /lib/VMCore/Function.cpp | |
parent | 757d243167a52fef433146be11fa1462f6468270 (diff) | |
download | external_llvm-6bb0ae47111f5b5f351e702e696fca7551cc3d30.zip external_llvm-6bb0ae47111f5b5f351e702e696fca7551cc3d30.tar.gz external_llvm-6bb0ae47111f5b5f351e702e696fca7551cc3d30.tar.bz2 |
Small optimization of parameter attribute lookup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44458 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Function.cpp')
-rw-r--r-- | lib/VMCore/Function.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp index 16728f6..3794955 100644 --- a/lib/VMCore/Function.cpp +++ b/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; |