summaryrefslogtreecommitdiffstats
path: root/llvm/utils
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2006-01-04 03:23:30 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2006-01-04 03:23:30 +0000
commita69bb989f1b490a6bc886b917537ae391ddfecdc (patch)
treea99deab809a9a8290f7ac1cc1fb9940074297eee /llvm/utils
parent7d17a6bc861756a3393ecbe3654d94bf75877bc5 (diff)
downloadbcm5719-llvm-a69bb989f1b490a6bc886b917537ae391ddfecdc.tar.gz
bcm5719-llvm-a69bb989f1b490a6bc886b917537ae391ddfecdc.zip
Replace fix with one less disruptive to the original code.
Also note that GCC 4.1 also correctly flags the syntax error. llvm-svn: 25076
Diffstat (limited to 'llvm/utils')
-rw-r--r--llvm/utils/TableGen/DAGISelEmitter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/DAGISelEmitter.cpp b/llvm/utils/TableGen/DAGISelEmitter.cpp
index 1fbb7c6946e..645392eb708 100644
--- a/llvm/utils/TableGen/DAGISelEmitter.cpp
+++ b/llvm/utils/TableGen/DAGISelEmitter.cpp
@@ -2030,13 +2030,12 @@ public:
std::string Fn = CP->getSelectFunc();
NumRes = CP->getNumOperands();
OS << " SDOperand ";
- unsigned i;
- for (i = 0; i < NumRes - 1; ++i)
+ for (unsigned i = 0; i < NumRes - 1; ++i)
OS << "Tmp" << (i+ResNo) << ",";
- OS << "Tmp" << (i+ResNo) << ";\n";
+ OS << "Tmp" << (NumRes - 1 + ResNo) << ";\n";
OS << " if (!" << Fn << "(" << Val;
- for (i = 0; i < NumRes; i++)
+ for (unsigned i = 0; i < NumRes; i++)
OS << ", Tmp" << i + ResNo;
OS << ")) goto P" << PatternNo << "Fail;\n";
TmpNo = ResNo + NumRes;
OpenPOWER on IntegriCloud