From: Chris Lattner Date: Fri, 6 Dec 2002 04:42:16 +0000 (+0000) Subject: Fix bug X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=28c2d409a5551b117da97defe168620ab525bfe0;p=oota-llvm.git Fix bug git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4942 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/support/tools/TableGen/FileParser.y b/support/tools/TableGen/FileParser.y index ff3ec40484c..76f07e465f8 100644 --- a/support/tools/TableGen/FileParser.y +++ b/support/tools/TableGen/FileParser.y @@ -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(); } diff --git a/utils/TableGen/FileParser.y b/utils/TableGen/FileParser.y index ff3ec40484c..76f07e465f8 100644 --- a/utils/TableGen/FileParser.y +++ b/utils/TableGen/FileParser.y @@ -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(); }