diff options
author | Chris Lattner <sabre@nondot.org> | 2011-10-14 22:50:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-10-14 22:50:21 +0000 |
commit | aeee2d3a297a2ca41a07d33285a75cee23ad97d9 (patch) | |
tree | 0923ade94ed5716c748a7900903e5807b24cb2eb /lib/VMCore/Function.cpp | |
parent | 2b28a74bc69e33eedc60f438e4fe9ef9ae606f3c (diff) |
constify array itself, don't iterate multiple times.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142013 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Function.cpp')
-rw-r--r-- | lib/VMCore/Function.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp index ef0827b110..1215e6a57c 100644 --- a/lib/VMCore/Function.cpp +++ b/lib/VMCore/Function.cpp @@ -417,7 +417,7 @@ bool Function::hasAddressTaken(const User* *PutOffender) const { /// FIXME: Remove after <rdar://problem/8031714> is fixed. /// FIXME: Is the above FIXME valid? bool Function::callsFunctionThatReturnsTwice() const { - static const char *ReturnsTwiceFns[] = { + static const char *const ReturnsTwiceFns[] = { "_setjmp", "setjmp", "sigsetjmp", @@ -442,7 +442,7 @@ bool Function::callsFunctionThatReturnsTwice() const { if (!F) continue; StringRef Name = F->getName(); - for (unsigned J = 0; J < array_lengthof(ReturnsTwiceFns); ++J) { + for (unsigned J = 0, e = array_lengthof(ReturnsTwiceFns); J != e; ++J) { if (Name == ReturnsTwiceFns[J]) return true; } |