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 | 8a038652f23d50b469478cffc7f0354617529730 (patch) | |
| tree | 3429ceebdb7c756ab3d19b56bd8de010dc69caf6 /llvm/lib/VMCore | |
| parent | 8d3e43ff4a5755da51e52d277832a90275ac5818 (diff) | |
| download | bcm5719-llvm-8a038652f23d50b469478cffc7f0354617529730.tar.gz bcm5719-llvm-8a038652f23d50b469478cffc7f0354617529730.zip  | |
constify array itself, don't iterate multiple times.
llvm-svn: 142013
Diffstat (limited to 'llvm/lib/VMCore')
| -rw-r--r-- | llvm/lib/VMCore/Function.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp index ef0827b110e..1215e6a57ce 100644 --- a/llvm/lib/VMCore/Function.cpp +++ b/llvm/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;      }  | 

