Fix bug
authorChris Lattner <sabre@nondot.org>
Fri, 6 Dec 2002 04:42:16 +0000 (04:42 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 6 Dec 2002 04:42:16 +0000 (04:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4942 91177308-0d34-0410-b5e6-96231b3b80d8

support/tools/TableGen/FileParser.y
utils/TableGen/FileParser.y

index ff3ec40484c447b55e05d41b9f772de2a30e5552..76f07e465f87fc4e3a9a6aadf74b734a10f55ffb 100644 (file)
@@ -92,8 +92,8 @@ static void setValue(const std::string &ValName,
     // Loop over bits, assigning values as appropriate...
     for (unsigned i = 0, e = BitList->size(); i != e; ++i) {
       unsigned Bit = (*BitList)[i];
-      if (NewVal->getBit(i)) {
-        err() << "Cannot set bit #" << i << " of value '" << ValName
+      if (NewVal->getBit(Bit)) {
+        err() << "Cannot set bit #" << Bit << " of value '" << ValName
               << "' more than once!\n";
         abort();
       }
index ff3ec40484c447b55e05d41b9f772de2a30e5552..76f07e465f87fc4e3a9a6aadf74b734a10f55ffb 100644 (file)
@@ -92,8 +92,8 @@ static void setValue(const std::string &ValName,
     // Loop over bits, assigning values as appropriate...
     for (unsigned i = 0, e = BitList->size(); i != e; ++i) {
       unsigned Bit = (*BitList)[i];
-      if (NewVal->getBit(i)) {
-        err() << "Cannot set bit #" << i << " of value '" << ValName
+      if (NewVal->getBit(Bit)) {
+        err() << "Cannot set bit #" << Bit << " of value '" << ValName
               << "' more than once!\n";
         abort();
       }