[llvm-branch-commits] [llvm-branch] r136017 - /llvm/branches/exception-handling-rewrite/include/llvm/Instructions.h

Bill Wendling isanbard at gmail.com
Mon Jul 25 16:56:43 PDT 2011


Author: void
Date: Mon Jul 25 18:56:42 2011
New Revision: 136017

URL: http://llvm.org/viewvc/llvm-project?rev=136017&view=rev
Log:
Fix another off-by-one error.

Modified:
    llvm/branches/exception-handling-rewrite/include/llvm/Instructions.h

Modified: llvm/branches/exception-handling-rewrite/include/llvm/Instructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/exception-handling-rewrite/include/llvm/Instructions.h?rev=136017&r1=136016&r2=136017&view=diff
==============================================================================
--- llvm/branches/exception-handling-rewrite/include/llvm/Instructions.h (original)
+++ llvm/branches/exception-handling-rewrite/include/llvm/Instructions.h Mon Jul 25 18:56:42 2011
@@ -1877,8 +1877,8 @@
 
   /// getClauseValue - Return the value of the clause at this index.
   const Value *getClauseValue(unsigned I) const {
-    assert(I < getNumOperands() && "Index too large!");
-    return OperandList[I];
+    assert(I + 1 < getNumOperands() && "Index too large!");
+    return OperandList[I + 1];
   }
 
   /// getNumClauses - Get the number of clauses for this landing pad.





More information about the llvm-branch-commits mailing list