[cfe-commits] r70680 - /cfe/trunk/lib/CodeGen/CGStmt.cpp

Chris Lattner sabre at nondot.org
Sun May 3 01:39:02 PDT 2009


Author: lattner
Date: Sun May  3 03:38:58 2009
New Revision: 70680

URL: http://llvm.org/viewvc/llvm-project?rev=70680&view=rev
Log:
don't shadow 'i'

Modified:
    cfe/trunk/lib/CodeGen/CGStmt.cpp

Modified: cfe/trunk/lib/CodeGen/CGStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmt.cpp?rev=70680&r1=70679&r2=70680&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmt.cpp Sun May  3 03:38:58 2009
@@ -844,14 +844,16 @@
       // we need to set the actual result type of the inline asm node to be the
       // same as the input type.
       if (Info.hasMatchingInput()) {
-        unsigned InputNo = ~0;
-        for (unsigned i = 0, e = S.getNumInputs(); i != e; ++i)
-          if (InputConstraintInfos[i].hasTiedOperand() &&
-              InputConstraintInfos[i].getTiedOperand() == i) {
+        unsigned InputNo;
+        for (InputNo = 0; InputNo != S.getNumInputs(); ++InputNo) {
+          TargetInfo::ConstraintInfo &Input = InputConstraintInfos[InputNo];
+          if (Input.hasTiedOperand() &&
+              Input.getTiedOperand() == i) {
             InputNo = i;
             break;
           }
-        assert(InputNo != ~0U && "Didn't find matching input!");
+        }
+        assert(InputNo != S.getNumInputs() && "Didn't find matching input!");
         
         QualType InputTy = S.getInputExpr(InputNo)->getType();
         QualType OutputTy = OutExpr->getType();





More information about the cfe-commits mailing list