]> granicus.if.org Git - clang/commitdiff
don't shadow 'i'
authorChris Lattner <sabre@nondot.org>
Sun, 3 May 2009 08:38:58 +0000 (08:38 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 3 May 2009 08:38:58 +0000 (08:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70680 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGStmt.cpp

index fb6d121eefd70c0c90b0c254503f416c6f043dc5..0e9cec42c81f5e4f32c6b456209667fabef3f0dc 100644 (file)
@@ -844,14 +844,16 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
       // 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();