diff --git a/utils/TableGen/FileParser.cpp b/utils/TableGen/FileParser.cpp index 3b2c4ee9007..ee0d1d5d2f6 100644 --- a/utils/TableGen/FileParser.cpp +++ b/utils/TableGen/FileParser.cpp @@ -276,7 +276,7 @@ static const short yyprhs[] = { 0, 133, 135, 136, 140, 141, 143, 145, 149, 154, 157, 164, 165, 168, 170, 174, 176, 181, 183, 187, 188, 191, 193, 197, 201, 202, 204, 206, 207, 209, 211, - 213, 214, 219, 223, 227, 229, 231, 236, 238, 242, + 213, 214, 218, 223, 227, 229, 231, 236, 238, 242, 243, 248, 253, 256, 258, 261 }; @@ -302,7 +302,7 @@ static const short yyrhs[] = { 19, 55, 0, 56, 34, 55, 0, 0, 35, 56, 0, 51, 0, 58, 34, 51, 0, 23, 58, 24, 0, 0, 59, 0, 19, 0, 0, 61, 0, 62, 0, - 62, 0, 0, 60, 57, 66, 54, 0, 10, 63, + 62, 0, 0, 57, 66, 54, 0, 10, 63, 60, 65, 0, 11, 64, 65, 0, 67, 0, 68, 0, 19, 48, 25, 42, 0, 70, 0, 71, 34, 70, 0, 0, 13, 73, 71, 14, 0, 72, 27, 74, @@ -321,8 +321,8 @@ static const short yyrline[] = { 0, 460, 462, 462, 466, 468, 472, 475, 479, 489, 491, 497, 497, 498, 498, 500, 502, 506, 511, 516, 519, 523, 526, 531, 532, 532, 534, 534, 536, 545, 553, - 562, 577, 582, 586, 599, 599, 601, 606, 606, 609, - 609, 612, 615, 619, 619, 621 + 562, 577, 582, 586, 595, 595, 597, 602, 602, 605, + 605, 608, 611, 615, 615, 617 }; #endif @@ -362,102 +362,102 @@ static const short yyr2[] = { 0, 1, 0, 3, 0, 1, 1, 3, 4, 2, 6, 0, 2, 1, 3, 1, 4, 1, 3, 0, 2, 1, 3, 3, 0, 1, 1, 0, 1, 1, 1, - 0, 4, 3, 3, 1, 1, 4, 1, 3, 0, + 0, 3, 4, 3, 1, 1, 4, 1, 3, 0, 4, 4, 2, 1, 2, 1 }; static const short yydefact[] = { 0, 67, 67, 80, 75, 76, 84, 0, 86, 66, 68, - 69, 64, 70, 64, 0, 0, 83, 85, 10, 65, - 59, 73, 74, 42, 78, 0, 0, 11, 0, 61, - 0, 0, 71, 0, 0, 81, 0, 82, 5, 3, - 2, 0, 0, 7, 8, 1, 9, 0, 63, 10, - 55, 57, 60, 0, 35, 41, 0, 0, 79, 0, - 0, 12, 62, 0, 0, 51, 53, 72, 37, 0, - 0, 43, 0, 0, 0, 14, 20, 15, 16, 17, - 44, 44, 0, 77, 0, 0, 0, 48, 46, 0, - 58, 10, 36, 38, 0, 0, 0, 0, 0, 45, - 0, 33, 0, 0, 0, 4, 6, 13, 56, 0, - 0, 54, 0, 52, 40, 0, 0, 0, 0, 0, - 18, 22, 29, 34, 0, 0, 0, 23, 47, 42, - 49, 39, 0, 0, 0, 19, 0, 31, 0, 24, - 21, 25, 0, 0, 0, 0, 30, 29, 0, 26, + 69, 64, 70, 59, 0, 0, 83, 85, 10, 65, + 59, 0, 71, 74, 42, 78, 0, 0, 11, 0, + 61, 0, 73, 1, 55, 57, 60, 0, 0, 0, + 81, 0, 82, 5, 3, 2, 0, 0, 7, 8, + 9, 0, 63, 10, 0, 0, 51, 53, 72, 35, + 41, 0, 0, 79, 0, 0, 12, 62, 0, 0, + 0, 14, 20, 15, 16, 17, 44, 44, 0, 46, + 0, 58, 10, 37, 0, 0, 43, 77, 0, 0, + 0, 48, 0, 0, 0, 0, 0, 45, 0, 33, + 0, 0, 0, 56, 0, 0, 54, 0, 52, 36, + 38, 4, 6, 13, 0, 0, 0, 0, 18, 22, + 29, 34, 0, 0, 0, 23, 47, 42, 49, 40, + 0, 0, 0, 0, 19, 0, 31, 0, 24, 21, + 25, 0, 39, 0, 0, 0, 30, 29, 0, 26, 27, 28, 32, 0, 50, 0, 0, 0 }; -static const short yydefgoto[] = { 47, - 48, 29, 88, 89, 138, 124, 125, 56, 57, 35, - 99, 100, 30, 114, 92, 68, 52, 53, 33, 31, - 20, 21, 10, 11, 12, 14, 22, 54, 4, 5, - 6, 25, 26, 7, 15, 8, 156 +static const short yydefgoto[] = { 35, + 52, 30, 92, 80, 137, 122, 123, 61, 62, 40, + 97, 98, 31, 109, 83, 59, 36, 37, 23, 32, + 20, 21, 10, 11, 12, 14, 24, 38, 4, 5, + 6, 26, 27, 7, 15, 8, 156 }; -static const short yypact[] = { 52, - 15, 15,-32768,-32768,-32768,-32768, 3, 52,-32768,-32768, --32768, 4,-32768, 4, 22, 52,-32768,-32768, 34,-32768, - -20,-32768,-32768, 28,-32768, -9, -2,-32768, 63,-32768, - -3, 37,-32768, 39, 35,-32768, 22,-32768,-32768,-32768, --32768, 50, 51,-32768,-32768,-32768,-32768, 59,-32768, 34, - 66,-32768, 45, -15, -12, 46, 62, 32,-32768, 102, - 63, 75,-32768, 32, 37,-32768,-32768,-32768,-32768, 104, - 106,-32768, 93, 94, 95,-32768, 105,-32768,-32768,-32768, - 32, 32, 110, 77, 107, 108, 32,-32768, 77, 8, --32768, 5,-32768, -8, 32, 32, 32, 32, 109, 96, - 103, 32, 39, 39, 115,-32768,-32768, 77,-32768, 32, - 116,-32768, 99,-32768,-32768, 120, 67, 68, 76, 11, --32768,-32768, 57, 111, 113, 112, 114,-32768, 77, 28, --32768,-32768, 32, 32, 32,-32768, 119,-32768, 32,-32768, --32768,-32768, 117, 82, 85, 90,-32768, 57, 32,-32768, --32768,-32768,-32768, 56,-32768, 141, 143,-32768 +static const short yypact[] = { 2, + 0, 0,-32768,-32768,-32768,-32768, 7, 2,-32768,-32768, +-32768, 17,-32768, -19, 33, 2,-32768,-32768, 41,-32768, + -19, 35,-32768,-32768, 14,-32768, -13, -3,-32768, 59, +-32768, -10,-32768,-32768, 34,-32768, 26, 22, 62, 54, +-32768, 33,-32768,-32768,-32768,-32768, 58, 66,-32768,-32768, +-32768, 65,-32768, 41, 29, 35,-32768,-32768,-32768, -9, + 51, 72, 29,-32768, 84, 59, 69,-32768, 74, 94, + 95,-32768, 102,-32768,-32768,-32768, 29, 29, 89, 93, + 49,-32768, 10,-32768, 110, 111,-32768, 93, 106, 107, + 29,-32768, 29, 29, 29, 29, 104, 99, 105, 29, + 62, 62, 115,-32768, 29, 117,-32768, 100,-32768,-32768, + -7,-32768,-32768, 93, 64, 70, 76, 53,-32768,-32768, + 61, 108, 112, 113, 109,-32768, 93, 14,-32768,-32768, + 120, 29, 29, 29,-32768, 123,-32768, 29,-32768,-32768, +-32768, 119,-32768, 82, 85, 90,-32768, 61, 29,-32768, +-32768,-32768,-32768, 45,-32768, 140, 146,-32768 }; -static const short yypgoto[] = { -25, - 86,-32768,-32768, -58, 0,-32768,-32768,-32768, -84, 19, - 69, -62, -49,-32768,-32768,-32768, 87,-32768,-32768,-32768, --32768,-32768,-32768, 148,-32768,-32768, 139,-32768,-32768,-32768, - -4, 118,-32768,-32768,-32768, 138,-32768 +static const short yypgoto[] = { -27, + 81,-32768,-32768, -63, 1,-32768,-32768,-32768, -66, 20, + 73, -53, -50,-32768,-32768,-32768, 96,-32768,-32768,-32768, +-32768,-32768,-32768, 148,-32768,-32768, 132,-32768,-32768,-32768, + -2, 114,-32768,-32768,-32768, 138,-32768 }; -#define YYLAST 155 +#define YYLAST 156 -static const short yytable[] = { 84, - 63, 90, 17, 18, 36, 69, 51, 1, 2, 115, - 3, 66, 1, 2, 32, 3, 28, 111, 126, 127, - 49, 67, 18, 70, 37, 38, 19, 116, 108, 16, - 50, 109, 112, 9, 136, 120, 117, 118, 119, 51, - 24, 110, 113, 123, 110, 28, 73, 74, 75, 76, - 77, 129, 78, 79, 34, 46, 55, 80, 81, 58, - 82, 1, 2, 83, 3, 39, 40, 41, 42, 43, - 44, 45, 60, 61, 144, 145, 146, 62, 65, 71, - 148, 46, 103, 103, 104, 104, 105, 105, 64, 72, - 154, 137, 155, 103, 103, 104, 104, 105, 105, 87, - 133, 134, 103, 103, 104, 104, 105, 105, 103, 135, - 104, 103, 105, 104, 150, 105, 103, 151, 104, 85, - 105, 93, 152, 94, 95, 96, 97, 98, 102, 110, - 106, 107, 122, 128, 130, 131, 121, 132, 147, 141, - 157, 149, 158, 142, 139, 140, 86, 153, 143, 13, - 101, 91, 23, 27, 59 +static const short yytable[] = { 88, + 41, 81, 51, 68, 17, 18, 1, 2, 84, 3, + 130, 1, 2, 53, 3, 22, 1, 2, 9, 3, + 42, 29, 106, 54, 43, 18, 85, 114, 131, 115, + 116, 117, 108, 16, 124, 125, 121, 107, 51, 19, + 39, 127, 118, 69, 70, 71, 72, 73, 57, 74, + 75, 25, 29, 34, 76, 77, 55, 78, 58, 56, + 79, 44, 45, 46, 47, 48, 49, 50, 144, 145, + 146, 101, 104, 102, 148, 103, 135, 34, 63, 60, + 65, 155, 105, 67, 86, 154, 105, 101, 66, 102, + 101, 103, 102, 91, 103, 136, 101, 132, 102, 87, + 103, 89, 101, 133, 102, 93, 103, 100, 101, 134, + 102, 101, 103, 102, 150, 103, 101, 151, 102, 101, + 103, 102, 152, 103, 96, 94, 95, 110, 111, 112, + 113, 119, 105, 126, 120, 128, 129, 143, 141, 157, + 140, 138, 147, 149, 139, 158, 90, 142, 153, 13, + 99, 82, 33, 28, 0, 64 }; -static const short yycheck[] = { 58, - 50, 64, 7, 8, 14, 18, 32, 10, 11, 18, - 13, 27, 10, 11, 35, 13, 12, 13, 103, 104, - 24, 37, 27, 36, 34, 28, 23, 36, 87, 27, - 34, 24, 28, 19, 24, 98, 95, 96, 97, 65, - 19, 34, 92, 102, 34, 12, 15, 16, 17, 18, - 19, 110, 21, 22, 27, 19, 18, 26, 27, 25, - 29, 10, 11, 32, 13, 3, 4, 5, 6, 7, - 8, 9, 23, 23, 133, 134, 135, 19, 34, 34, - 139, 19, 27, 27, 29, 29, 31, 31, 23, 28, - 149, 35, 37, 27, 27, 29, 29, 31, 31, 25, - 34, 34, 27, 27, 29, 29, 31, 31, 27, 34, - 29, 27, 31, 29, 33, 31, 27, 33, 29, 18, - 31, 18, 33, 18, 32, 32, 32, 23, 19, 34, - 24, 24, 30, 19, 19, 37, 28, 18, 20, 28, - 0, 25, 0, 30, 34, 33, 61, 148, 130, 2, - 82, 65, 14, 16, 37 +static const short yycheck[] = { 63, + 14, 55, 30, 54, 7, 8, 10, 11, 18, 13, + 18, 10, 11, 24, 13, 35, 10, 11, 19, 13, + 34, 12, 13, 34, 28, 28, 36, 91, 36, 93, + 94, 95, 83, 27, 101, 102, 100, 28, 66, 23, + 27, 105, 96, 15, 16, 17, 18, 19, 27, 21, + 22, 19, 12, 19, 26, 27, 23, 29, 37, 34, + 32, 3, 4, 5, 6, 7, 8, 9, 132, 133, + 134, 27, 24, 29, 138, 31, 24, 19, 25, 18, + 23, 37, 34, 19, 34, 149, 34, 27, 23, 29, + 27, 31, 29, 25, 31, 35, 27, 34, 29, 28, + 31, 18, 27, 34, 29, 32, 31, 19, 27, 34, + 29, 27, 31, 29, 33, 31, 27, 33, 29, 27, + 31, 29, 33, 31, 23, 32, 32, 18, 18, 24, + 24, 28, 34, 19, 30, 19, 37, 18, 30, 0, + 28, 34, 20, 25, 33, 0, 66, 128, 148, 2, + 78, 56, 21, 16, -1, 42 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/share/bison.simple" @@ -1545,7 +1545,7 @@ case 71: delete (*yyvsp[0].SubClassList)[i].second; } delete yyvsp[0].SubClassList; // Delete the class list... - + // Process any variables on the set stack... for (unsigned i = 0, e = LetStack.size(); i != e; ++i) for (unsigned j = 0, e = LetStack[i].size(); j != e; ++j) @@ -1564,8 +1564,8 @@ case 72: case 73: #line 582 "/Users/sabre/llvm/utils/TableGen/FileParser.y" { - yyval.Rec = yyvsp[0].Rec; -; + yyval.Rec = yyvsp[0].Rec; + ; break;} case 74: #line 586 "/Users/sabre/llvm/utils/TableGen/FileParser.y" @@ -1573,47 +1573,43 @@ case 74: yyvsp[0].Rec->resolveReferences(); // If ObjectBody has template arguments, it's an error. - if (!yyvsp[0].Rec->getTemplateArgs().empty()) { - err() << "Def '" << yyvsp[0].Rec->getName() - << "' is not permitted to have template arguments!\n"; - exit(1); - } + assert(yyvsp[0].Rec->getTemplateArgs().empty() && "How'd this get template args?"); yyval.Rec = yyvsp[0].Rec; ; break;} case 77: -#line 601 "/Users/sabre/llvm/utils/TableGen/FileParser.y" +#line 597 "/Users/sabre/llvm/utils/TableGen/FileParser.y" { LetStack.back().push_back(LetRecord(*yyvsp[-3].StrVal, yyvsp[-2].BitList, yyvsp[0].Initializer)); delete yyvsp[-3].StrVal; delete yyvsp[-2].BitList; ; break;} case 80: -#line 609 "/Users/sabre/llvm/utils/TableGen/FileParser.y" +#line 605 "/Users/sabre/llvm/utils/TableGen/FileParser.y" { LetStack.push_back(std::vector()); ; break;} case 82: -#line 612 "/Users/sabre/llvm/utils/TableGen/FileParser.y" +#line 608 "/Users/sabre/llvm/utils/TableGen/FileParser.y" { LetStack.pop_back(); ; break;} case 83: -#line 615 "/Users/sabre/llvm/utils/TableGen/FileParser.y" +#line 611 "/Users/sabre/llvm/utils/TableGen/FileParser.y" { LetStack.pop_back(); ; break;} case 84: -#line 619 "/Users/sabre/llvm/utils/TableGen/FileParser.y" +#line 615 "/Users/sabre/llvm/utils/TableGen/FileParser.y" {; break;} case 85: -#line 619 "/Users/sabre/llvm/utils/TableGen/FileParser.y" +#line 615 "/Users/sabre/llvm/utils/TableGen/FileParser.y" {; break;} case 86: -#line 621 "/Users/sabre/llvm/utils/TableGen/FileParser.y" +#line 617 "/Users/sabre/llvm/utils/TableGen/FileParser.y" {; break;} } @@ -1838,7 +1834,7 @@ yyerrhandle: } return 1; } -#line 623 "/Users/sabre/llvm/utils/TableGen/FileParser.y" +#line 619 "/Users/sabre/llvm/utils/TableGen/FileParser.y" int yyerror(const char *ErrorMsg) {