diff options
author | Chris Lattner <sabre@nondot.org> | 2009-05-03 08:38:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-05-03 08:38:58 +0000 |
commit | 99837deeaf72edd554ba3195c98be57f81445cb3 (patch) | |
tree | 93391185c6f68d34b2ef088e165a0a9cd4717395 /clang/lib/CodeGen/CGStmt.cpp | |
parent | cc1cde9c579a747e6374ca90828a39c0cb075646 (diff) | |
download | bcm5719-llvm-99837deeaf72edd554ba3195c98be57f81445cb3.tar.gz bcm5719-llvm-99837deeaf72edd554ba3195c98be57f81445cb3.zip |
don't shadow 'i'
llvm-svn: 70680
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index fb6d121eefd..0e9cec42c81 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -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(); |