aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-05-03 08:38:58 +0000
committerChris Lattner <sabre@nondot.org>2009-05-03 08:38:58 +0000
commitebfc9857de58a326c84629915d9ffe3f36d8cc26 (patch)
treef19f78f2112658a7910085555a0d51e09e110558 /lib/CodeGen/CGStmt.cpp
parent3351f1145aa91ddd8022fcd3ca16c219db9e8277 (diff)
don't shadow 'i'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGStmt.cpp')
-rw-r--r--lib/CodeGen/CGStmt.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp
index fb6d121eef..0e9cec42c8 100644
--- a/lib/CodeGen/CGStmt.cpp
+++ b/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();