diff options
author | Jeff Cohen <jeffc@jolt-lang.org> | 2006-01-04 03:23:30 +0000 |
---|---|---|
committer | Jeff Cohen <jeffc@jolt-lang.org> | 2006-01-04 03:23:30 +0000 |
commit | 60e9187a90c93a7660946789af52d9b40f652a0c (patch) | |
tree | 3631e37e7bef1081437f313c810558210c8baffe | |
parent | f356d70ec3a231ee760529fa1ca966f3e0b5161c (diff) | |
download | external_llvm-60e9187a90c93a7660946789af52d9b40f652a0c.zip external_llvm-60e9187a90c93a7660946789af52d9b40f652a0c.tar.gz external_llvm-60e9187a90c93a7660946789af52d9b40f652a0c.tar.bz2 |
Replace fix with one less disruptive to the original code.
Also note that GCC 4.1 also correctly flags the syntax error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25076 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | utils/TableGen/DAGISelEmitter.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index 1fbb7c6..645392e 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/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; |