[llvm-commits] CVS: llvm/tools/llvm-upgrade/UpgradeParser.cpp UpgradeParser.cpp.cvs UpgradeParser.h UpgradeParser.h.cvs UpgradeParser.y.cvs
Reid Spencer
reid at x10sys.com
Sat Dec 9 08:57:37 PST 2006
Changes in directory llvm/tools/llvm-upgrade:
UpgradeParser.cpp updated: 1.24 -> 1.25
UpgradeParser.cpp.cvs updated: 1.22 -> 1.23
UpgradeParser.h updated: 1.18 -> 1.19
UpgradeParser.h.cvs updated: 1.16 -> 1.17
UpgradeParser.y.cvs updated: 1.21 -> 1.22
---
Log message:
Regenerate.
---
Diffs of the changes: (+418 -400)
UpgradeParser.cpp | 400 +++++++++++++++++++++++++-------------------------
UpgradeParser.cpp.cvs | 400 +++++++++++++++++++++++++-------------------------
UpgradeParser.h | 2
UpgradeParser.h.cvs | 2
UpgradeParser.y.cvs | 14 +
5 files changed, 418 insertions(+), 400 deletions(-)
Index: llvm/tools/llvm-upgrade/UpgradeParser.cpp
diff -u llvm/tools/llvm-upgrade/UpgradeParser.cpp:1.24 llvm/tools/llvm-upgrade/UpgradeParser.cpp:1.25
--- llvm/tools/llvm-upgrade/UpgradeParser.cpp:1.24 Wed Dec 6 22:23:03 2006
+++ llvm/tools/llvm-upgrade/UpgradeParser.cpp Sat Dec 9 10:57:22 2006
@@ -552,10 +552,16 @@
// the original intent by replace the cast with a setne
const char* comparator = SrcTy.isPointer() ? ", null" :
(SrcTy.isFloatingPoint() ? ", 0.0" : ", 0");
- if (isConst)
- Result = "setne (" + Source + comparator + ")";
- else
- Result = "setne " + Source + comparator;
+#if UPGRADE_SETCOND_OPS
+ const char* compareOp = SrcTy.isFloatingPoint() ? "setne " : "icmp ne ";
+#else
+ const char* compareOp = "setne";
+#endif
+ if (isConst) {
+ Result = "(" + Source + comparator + ")";
+ Result = compareOp + Result;
+ } else
+ Result = compareOp + Source + comparator;
return Result; // skip cast processing below
}
ResolveType(SrcTy);
@@ -651,7 +657,7 @@
#endif
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 279 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 285 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
typedef union YYSTYPE {
std::string* String;
TypeInfo Type;
@@ -660,7 +666,7 @@
ValueList* ValList;
} YYSTYPE;
/* Line 196 of yacc.c. */
-#line 664 "UpgradeParser.tab.c"
+#line 670 "UpgradeParser.tab.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
@@ -672,7 +678,7 @@
/* Line 219 of yacc.c. */
-#line 676 "UpgradeParser.tab.c"
+#line 682 "UpgradeParser.tab.c"
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
@@ -1026,36 +1032,36 @@
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const unsigned short int yyrline[] =
{
- 0, 342, 342, 342, 343, 343, 347, 347, 347, 347,
- 347, 347, 347, 348, 348, 348, 348, 349, 349, 349,
- 350, 350, 350, 350, 350, 350, 351, 351, 351, 351,
- 351, 351, 351, 351, 351, 351, 352, 352, 352, 352,
- 352, 352, 352, 352, 352, 352, 353, 353, 353, 353,
- 353, 353, 354, 354, 354, 354, 355, 355, 355, 355,
- 355, 355, 355, 356, 356, 356, 356, 356, 356, 361,
- 361, 361, 361, 362, 362, 362, 362, 363, 363, 364,
- 364, 367, 370, 375, 375, 375, 375, 375, 375, 376,
- 377, 380, 380, 380, 380, 380, 381, 382, 387, 392,
- 393, 396, 397, 405, 411, 412, 415, 416, 425, 426,
- 439, 439, 440, 440, 441, 445, 445, 445, 445, 445,
- 445, 445, 446, 446, 446, 446, 446, 448, 452, 456,
- 459, 464, 470, 478, 486, 492, 496, 507, 510, 518,
- 519, 524, 527, 537, 543, 548, 554, 560, 566, 571,
- 577, 583, 589, 595, 601, 607, 613, 619, 625, 633,
- 647, 659, 664, 670, 675, 683, 688, 693, 701, 706,
- 711, 721, 726, 731, 731, 741, 746, 749, 754, 758,
- 762, 764, 764, 767, 779, 784, 789, 798, 807, 816,
- 825, 830, 835, 840, 842, 842, 845, 850, 857, 862,
- 869, 876, 881, 882, 890, 890, 891, 891, 893, 900,
- 904, 908, 911, 916, 919, 921, 941, 942, 944, 953,
- 954, 956, 964, 965, 966, 970, 983, 984, 987, 987,
- 987, 987, 987, 987, 987, 988, 989, 994, 995, 1004,
- 1004, 1008, 1014, 1025, 1031, 1034, 1042, 1046, 1051, 1054,
- 1060, 1060, 1062, 1067, 1072, 1077, 1085, 1092, 1098, 1118,
- 1123, 1129, 1134, 1142, 1151, 1158, 1166, 1170, 1177, 1178,
- 1182, 1187, 1190, 1196, 1201, 1209, 1214, 1219, 1224, 1232,
- 1246, 1251, 1256, 1261, 1266, 1271, 1276, 1293, 1298, 1299,
- 1303, 1304, 1307, 1314, 1321, 1328, 1335, 1340, 1347, 1354
+ 0, 348, 348, 348, 349, 349, 353, 353, 353, 353,
+ 353, 353, 353, 354, 354, 354, 354, 355, 355, 355,
+ 356, 356, 356, 356, 356, 356, 357, 357, 357, 357,
+ 357, 357, 357, 357, 357, 357, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 359, 359, 359, 359,
+ 359, 359, 360, 360, 360, 360, 361, 361, 361, 361,
+ 361, 361, 361, 362, 362, 362, 362, 362, 362, 367,
+ 367, 367, 367, 368, 368, 368, 368, 369, 369, 370,
+ 370, 373, 376, 381, 381, 381, 381, 381, 381, 382,
+ 383, 386, 386, 386, 386, 386, 387, 388, 393, 398,
+ 399, 402, 403, 411, 417, 418, 421, 422, 431, 432,
+ 445, 445, 446, 446, 447, 451, 451, 451, 451, 451,
+ 451, 451, 452, 452, 452, 452, 452, 454, 458, 462,
+ 465, 470, 476, 484, 492, 498, 502, 513, 516, 524,
+ 525, 530, 533, 543, 549, 554, 560, 566, 572, 577,
+ 583, 589, 595, 601, 607, 613, 619, 625, 631, 639,
+ 653, 665, 670, 676, 681, 689, 694, 699, 707, 712,
+ 717, 727, 732, 737, 737, 747, 752, 755, 760, 764,
+ 768, 770, 770, 773, 785, 790, 795, 804, 813, 822,
+ 831, 836, 841, 846, 848, 848, 851, 856, 863, 868,
+ 875, 882, 887, 888, 896, 896, 897, 897, 899, 906,
+ 910, 914, 917, 922, 925, 927, 947, 948, 950, 959,
+ 960, 962, 970, 971, 972, 976, 989, 990, 993, 993,
+ 993, 993, 993, 993, 993, 994, 995, 1000, 1001, 1010,
+ 1010, 1014, 1020, 1031, 1037, 1040, 1048, 1052, 1057, 1060,
+ 1066, 1066, 1068, 1073, 1078, 1083, 1091, 1098, 1104, 1124,
+ 1129, 1135, 1140, 1148, 1157, 1164, 1172, 1176, 1183, 1184,
+ 1188, 1193, 1196, 1202, 1207, 1215, 1220, 1225, 1230, 1238,
+ 1252, 1257, 1262, 1267, 1272, 1277, 1282, 1299, 1304, 1305,
+ 1309, 1310, 1313, 1320, 1327, 1334, 1341, 1346, 1353, 1360
};
#endif
@@ -2402,26 +2408,26 @@
switch (yyn)
{
case 81:
-#line 367 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 373 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = (yyvsp[-1].String);
;}
break;
case 82:
-#line 370 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 376 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = new std::string("");
;}
break;
case 90:
-#line 377 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 383 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(""); ;}
break;
case 97:
-#line 382 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 388 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-1].String) += *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -2430,27 +2436,27 @@
break;
case 98:
-#line 387 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 393 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(""); ;}
break;
case 99:
-#line 392 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 398 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 100:
-#line 393 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 399 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ *(yyvsp[-1].String) += " " + *(yyvsp[0].String); delete (yyvsp[0].String); (yyval.String) = (yyvsp[-1].String); ;}
break;
case 101:
-#line 396 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 402 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 102:
-#line 397 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 403 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyvsp[-1].String)->insert(0, ", ");
*(yyvsp[-1].String) += " " + *(yyvsp[0].String);
@@ -2460,7 +2466,7 @@
break;
case 103:
-#line 405 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 411 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-1].String) += " " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -2469,17 +2475,17 @@
break;
case 104:
-#line 411 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 417 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 106:
-#line 415 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 421 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 107:
-#line 416 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 422 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyvsp[-1].String)->insert(0, ", ");
if (!(yyvsp[0].String)->empty())
@@ -2490,7 +2496,7 @@
break;
case 109:
-#line 426 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 432 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-1].String) += " " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -2499,7 +2505,7 @@
break;
case 127:
-#line 448 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 454 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Type).newTy = (yyvsp[0].String);
(yyval.Type).oldTy = OpaqueTy;
@@ -2507,7 +2513,7 @@
break;
case 128:
-#line 452 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 458 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Type).newTy = (yyvsp[0].String);
(yyval.Type).oldTy = UnresolvedTy;
@@ -2515,14 +2521,14 @@
break;
case 129:
-#line 456 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 462 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Type) = (yyvsp[0].Type);
;}
break;
case 130:
-#line 459 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 465 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Type UpReference
(yyvsp[0].String)->insert(0, "\\");
(yyval.Type).newTy = (yyvsp[0].String);
@@ -2531,7 +2537,7 @@
break;
case 131:
-#line 464 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 470 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Function derived type?
*(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )";
delete (yyvsp[-1].String);
@@ -2541,7 +2547,7 @@
break;
case 132:
-#line 470 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 476 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Sized array type?
(yyvsp[-3].String)->insert(0,"[ ");
*(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " ]";
@@ -2553,7 +2559,7 @@
break;
case 133:
-#line 478 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 484 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Packed array type?
(yyvsp[-3].String)->insert(0,"< ");
*(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " >";
@@ -2565,7 +2571,7 @@
break;
case 134:
-#line 486 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 492 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Structure type?
(yyvsp[-1].String)->insert(0, "{ ");
*(yyvsp[-1].String) += " }";
@@ -2575,7 +2581,7 @@
break;
case 135:
-#line 492 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 498 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Empty structure type?
(yyval.Type).newTy = new std::string("{}");
(yyval.Type).oldTy = StructTy;
@@ -2583,7 +2589,7 @@
break;
case 136:
-#line 496 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 502 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Pointer type?
*(yyvsp[-1].Type).newTy += '*';
(yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
@@ -2593,14 +2599,14 @@
break;
case 137:
-#line 507 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 513 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = (yyvsp[0].Type).newTy;
;}
break;
case 138:
-#line 510 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 516 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy;
delete (yyvsp[0].Type).newTy;
@@ -2609,7 +2615,7 @@
break;
case 140:
-#line 519 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 525 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += ", ...";
delete (yyvsp[0].String);
@@ -2618,21 +2624,21 @@
break;
case 141:
-#line 524 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 530 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = (yyvsp[0].String);
;}
break;
case 142:
-#line 527 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 533 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = new std::string();
;}
break;
case 143:
-#line 537 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 543 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Nonempty unsized arr
(yyval.Const).type = (yyvsp[-3].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
@@ -2642,7 +2648,7 @@
break;
case 144:
-#line 543 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 549 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-2].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
@@ -2651,7 +2657,7 @@
break;
case 145:
-#line 548 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 554 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-2].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
@@ -2661,7 +2667,7 @@
break;
case 146:
-#line 554 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 560 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Nonempty unsized arr
(yyval.Const).type = (yyvsp[-3].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
@@ -2671,7 +2677,7 @@
break;
case 147:
-#line 560 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 566 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-3].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
@@ -2681,7 +2687,7 @@
break;
case 148:
-#line 566 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 572 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-2].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
@@ -2690,7 +2696,7 @@
break;
case 149:
-#line 571 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 577 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2700,7 +2706,7 @@
break;
case 150:
-#line 577 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 583 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2710,7 +2716,7 @@
break;
case 151:
-#line 583 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 589 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2720,7 +2726,7 @@
break;
case 152:
-#line 589 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 595 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2730,7 +2736,7 @@
break;
case 153:
-#line 595 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 601 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2740,7 +2746,7 @@
break;
case 154:
-#line 601 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 607 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // integral constants
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2750,7 +2756,7 @@
break;
case 155:
-#line 607 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 613 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // integral constants
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2760,7 +2766,7 @@
break;
case 156:
-#line 613 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 619 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Boolean constants
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2770,7 +2776,7 @@
break;
case 157:
-#line 619 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 625 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Boolean constants
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2780,7 +2786,7 @@
break;
case 158:
-#line 625 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 631 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Float & Double constants
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2790,7 +2796,7 @@
break;
case 159:
-#line 633 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 639 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
std::string source = *(yyvsp[-3].Const).cnst;
TypeInfo DstTy = (yyvsp[-1].Type);
@@ -2808,7 +2814,7 @@
break;
case 160:
-#line 647 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 653 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst;
for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
@@ -2824,7 +2830,7 @@
break;
case 161:
-#line 659 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 665 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
(yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
@@ -2833,7 +2839,7 @@
break;
case 162:
-#line 664 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 670 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
const char* op = getDivRemOpcode(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
(yyval.String) = new std::string(op);
@@ -2843,7 +2849,7 @@
break;
case 163:
-#line 670 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 676 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
(yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
@@ -2852,7 +2858,7 @@
break;
case 164:
-#line 675 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 681 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
#if UPGRADE_SETCOND_OPS
*(yyvsp[-5].String) = getCompareOp(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
@@ -2864,7 +2870,7 @@
break;
case 165:
-#line 683 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 689 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
@@ -2873,7 +2879,7 @@
break;
case 166:
-#line 688 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 694 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
@@ -2882,7 +2888,7 @@
break;
case 167:
-#line 693 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 699 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
const char* shiftop = (yyvsp[-5].String)->c_str();
if (*(yyvsp[-5].String) == "shr")
@@ -2894,7 +2900,7 @@
break;
case 168:
-#line 701 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 707 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
(yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
@@ -2903,7 +2909,7 @@
break;
case 169:
-#line 706 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 712 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
(yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
@@ -2912,7 +2918,7 @@
break;
case 170:
-#line 711 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 717 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
(yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
@@ -2921,7 +2927,7 @@
break;
case 171:
-#line 721 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 727 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst;
(yyvsp[0].Const).destroy();
@@ -2930,25 +2936,25 @@
break;
case 172:
-#line 726 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 732 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;}
break;
case 175:
-#line 741 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 747 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
;}
break;
case 176:
-#line 746 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 752 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = 0;
;}
break;
case 177:
-#line 749 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 755 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << *(yyvsp[0].String) << "\n";
delete (yyvsp[0].String);
@@ -2957,7 +2963,7 @@
break;
case 178:
-#line 754 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 760 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << "module asm " << " " << *(yyvsp[0].String) << "\n";
(yyval.String) = 0;
@@ -2965,7 +2971,7 @@
break;
case 179:
-#line 758 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 764 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << "implementation\n";
(yyval.String) = 0;
@@ -2973,17 +2979,17 @@
break;
case 180:
-#line 762 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 768 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = 0; ;}
break;
case 182:
-#line 764 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 770 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = (yyvsp[0].String); *(yyval.String) = "external"; ;}
break;
case 183:
-#line 767 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 773 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
EnumeratedTypes.push_back((yyvsp[0].Type));
if (!(yyvsp[-2].String)->empty()) {
@@ -2999,7 +3005,7 @@
break;
case 184:
-#line 779 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 785 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Function prototypes can be in const pool
*O << *(yyvsp[0].String) << "\n";
delete (yyvsp[0].String);
@@ -3008,7 +3014,7 @@
break;
case 185:
-#line 784 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 790 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Asm blocks can be in the const pool
*O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
@@ -3017,7 +3023,7 @@
break;
case 186:
-#line 789 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 795 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-4].String)->empty()) {
*O << *(yyvsp[-4].String) << " = ";
@@ -3030,7 +3036,7 @@
break;
case 187:
-#line 798 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 804 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-4].String)->empty()) {
*O << *(yyvsp[-4].String) << " = ";
@@ -3043,7 +3049,7 @@
break;
case 188:
-#line 807 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 813 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-4].String)->empty()) {
*O << *(yyvsp[-4].String) << " = ";
@@ -3056,7 +3062,7 @@
break;
case 189:
-#line 816 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 822 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-4].String)->empty()) {
*O << *(yyvsp[-4].String) << " = ";
@@ -3069,7 +3075,7 @@
break;
case 190:
-#line 825 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 831 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
delete (yyvsp[-1].String); delete (yyvsp[0].String);
@@ -3078,7 +3084,7 @@
break;
case 191:
-#line 830 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 836 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << "\n";
delete (yyvsp[-2].String); delete (yyvsp[0].String);
@@ -3087,14 +3093,14 @@
break;
case 192:
-#line 835 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 841 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = 0;
;}
break;
case 196:
-#line 845 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 851 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -3103,7 +3109,7 @@
break;
case 197:
-#line 850 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 856 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
if (*(yyvsp[0].String) == "64")
@@ -3114,7 +3120,7 @@
break;
case 198:
-#line 857 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 863 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -3123,7 +3129,7 @@
break;
case 199:
-#line 862 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 868 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -3132,7 +3138,7 @@
break;
case 200:
-#line 869 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 875 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyvsp[-1].String)->insert(0, "[ ");
*(yyvsp[-1].String) += " ]";
@@ -3141,7 +3147,7 @@
break;
case 201:
-#line 876 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 882 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -3150,19 +3156,19 @@
break;
case 203:
-#line 882 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 888 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = new std::string();
;}
break;
case 207:
-#line 891 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 897 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 208:
-#line 893 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 899 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = (yyvsp[-1].Type).newTy;
if (!(yyvsp[0].String)->empty())
@@ -3172,7 +3178,7 @@
break;
case 209:
-#line 900 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 906 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -3180,21 +3186,21 @@
break;
case 210:
-#line 904 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 910 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = (yyvsp[0].String);
;}
break;
case 211:
-#line 908 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 914 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = (yyvsp[0].String);
;}
break;
case 212:
-#line 911 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 917 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += ", ...";
(yyval.String) = (yyvsp[-2].String);
@@ -3203,19 +3209,19 @@
break;
case 213:
-#line 916 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 922 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = (yyvsp[0].String);
;}
break;
case 214:
-#line 919 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 925 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 215:
-#line 922 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 928 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-7].String)->empty()) {
*(yyvsp[-7].String) += " ";
@@ -3237,17 +3243,17 @@
break;
case 216:
-#line 941 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 947 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string("{"); delete (yyvsp[0].String); ;}
break;
case 217:
-#line 942 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 948 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string ("{"); ;}
break;
case 218:
-#line 944 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 950 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-2].String)->empty()) {
*O << *(yyvsp[-2].String) << " ";
@@ -3259,17 +3265,17 @@
break;
case 219:
-#line 953 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 959 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string("}"); delete (yyvsp[0].String); ;}
break;
case 220:
-#line 954 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 960 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string("}"); ;}
break;
case 221:
-#line 956 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 962 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if ((yyvsp[-1].String))
*O << *(yyvsp[-1].String);
@@ -3279,12 +3285,12 @@
break;
case 222:
-#line 964 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 970 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 225:
-#line 970 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 976 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-1].String)->empty())
*(yyvsp[-2].String) += " " + *(yyvsp[-1].String);
@@ -3296,12 +3302,12 @@
break;
case 226:
-#line 983 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 989 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 236:
-#line 989 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 995 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyvsp[-1].String)->insert(0, "<");
*(yyvsp[-1].String) += ">";
@@ -3310,7 +3316,7 @@
break;
case 238:
-#line 995 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1001 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-3].String)->empty()) {
*(yyvsp[-4].String) += " " + *(yyvsp[-3].String);
@@ -3322,7 +3328,7 @@
break;
case 241:
-#line 1008 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1014 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Value).val = (yyvsp[0].String);
(yyval.Value).constant = false;
@@ -3332,7 +3338,7 @@
break;
case 242:
-#line 1014 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1020 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Value).val = (yyvsp[0].String);
(yyval.Value).constant = true;
@@ -3342,7 +3348,7 @@
break;
case 243:
-#line 1025 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1031 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Value) = (yyvsp[0].Value);
(yyval.Value).type = (yyvsp[-1].Type);
@@ -3351,28 +3357,28 @@
break;
case 244:
-#line 1031 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1037 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = 0;
;}
break;
case 245:
-#line 1034 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1040 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Do not allow functions with 0 basic blocks
(yyval.String) = 0;
;}
break;
case 246:
-#line 1042 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1048 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = 0;
;}
break;
case 247:
-#line 1046 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1052 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << " " << *(yyvsp[0].String) << "\n";
delete (yyvsp[0].String);
@@ -3381,14 +3387,14 @@
break;
case 248:
-#line 1051 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1057 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = 0;
;}
break;
case 249:
-#line 1054 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1060 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << *(yyvsp[0].String) << "\n";
delete (yyvsp[0].String);
@@ -3397,12 +3403,12 @@
break;
case 251:
-#line 1060 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1066 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = (yyvsp[0].String); *(yyval.String) = "unwind"; ;}
break;
case 252:
-#line 1062 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1068 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Return with a result...
*O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Value).val << "\n";
delete (yyvsp[-1].String); (yyvsp[0].Value).destroy();
@@ -3411,7 +3417,7 @@
break;
case 253:
-#line 1067 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1073 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Return with no result...
*O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
@@ -3420,7 +3426,7 @@
break;
case 254:
-#line 1072 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1078 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Unconditional Branch...
*O << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
@@ -3429,7 +3435,7 @@
break;
case 255:
-#line 1077 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1083 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
<< *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << ", " << *(yyvsp[-1].Type).newTy << " "
@@ -3441,7 +3447,7 @@
break;
case 256:
-#line 1085 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1091 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
<< *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " [" << *(yyvsp[-1].String) << " ]\n";
@@ -3452,7 +3458,7 @@
break;
case 257:
-#line 1092 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1098 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << " " << *(yyvsp[-7].String) << " " << *(yyvsp[-6].Type).newTy << " " << *(yyvsp[-5].Value).val << ", "
<< *(yyvsp[-3].Type).newTy << " " << *(yyvsp[-2].Value).val << "[]\n";
@@ -3462,7 +3468,7 @@
break;
case 258:
-#line 1099 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1105 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << " ";
if (!(yyvsp[-13].String)->empty())
@@ -3485,7 +3491,7 @@
break;
case 259:
-#line 1118 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1124 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << " " << *(yyvsp[0].String) << "\n";
delete (yyvsp[0].String);
@@ -3494,7 +3500,7 @@
break;
case 260:
-#line 1123 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1129 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << " " << *(yyvsp[0].String) << "\n";
delete (yyvsp[0].String);
@@ -3503,7 +3509,7 @@
break;
case 261:
-#line 1129 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1135 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
(yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
@@ -3512,7 +3518,7 @@
break;
case 262:
-#line 1134 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1140 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " );
*(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
@@ -3522,7 +3528,7 @@
break;
case 263:
-#line 1142 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1148 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-1].String)->empty())
*(yyvsp[-1].String) += " = ";
@@ -3533,7 +3539,7 @@
break;
case 264:
-#line 1151 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1157 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Used for PHI nodes
(yyvsp[-3].Value).val->insert(0, *(yyvsp[-5].Type).newTy + "[");
*(yyvsp[-3].Value).val += "," + *(yyvsp[-1].Value).val + "]";
@@ -3544,7 +3550,7 @@
break;
case 265:
-#line 1158 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1164 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-6].String) += ", [" + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + "]";
(yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
@@ -3553,7 +3559,7 @@
break;
case 266:
-#line 1166 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1172 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.ValList) = new ValueList();
(yyval.ValList)->push_back((yyvsp[0].Value));
@@ -3561,7 +3567,7 @@
break;
case 267:
-#line 1170 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1176 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyvsp[-2].ValList)->push_back((yyvsp[0].Value));
(yyval.ValList) = (yyvsp[-2].ValList);
@@ -3569,17 +3575,17 @@
break;
case 268:
-#line 1177 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1183 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.ValList) = (yyvsp[0].ValList); ;}
break;
case 269:
-#line 1178 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1184 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.ValList) = new ValueList(); ;}
break;
case 270:
-#line 1182 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1188 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-1].String) += " " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -3588,7 +3594,7 @@
break;
case 272:
-#line 1190 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1196 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
const char* op = getDivRemOpcode(*(yyvsp[-4].String), (yyvsp[-3].Type));
(yyval.String) = new std::string(op);
@@ -3598,7 +3604,7 @@
break;
case 273:
-#line 1196 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1202 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
(yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
@@ -3607,7 +3613,7 @@
break;
case 274:
-#line 1201 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1207 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
#if UPGRADE_SETCOND_OPS
*(yyvsp[-4].String) = getCompareOp(*(yyvsp[-4].String), (yyvsp[-3].Type));
@@ -3619,7 +3625,7 @@
break;
case 275:
-#line 1209 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1215 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")";
delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
@@ -3628,7 +3634,7 @@
break;
case 276:
-#line 1214 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1220 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")";
delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
@@ -3637,7 +3643,7 @@
break;
case 277:
-#line 1219 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1225 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
(yyvsp[0].Value).destroy();
@@ -3646,7 +3652,7 @@
break;
case 278:
-#line 1224 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1230 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
const char* shiftop = (yyvsp[-3].String)->c_str();
if (*(yyvsp[-3].String) == "shr")
@@ -3658,7 +3664,7 @@
break;
case 279:
-#line 1232 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1238 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
std::string source = *(yyvsp[-2].Value).val;
TypeInfo SrcTy = (yyvsp[-2].Value).type;
@@ -3676,7 +3682,7 @@
break;
case 280:
-#line 1246 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1252 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
(yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
@@ -3685,7 +3691,7 @@
break;
case 281:
-#line 1251 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1257 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy;
(yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy();
@@ -3694,7 +3700,7 @@
break;
case 282:
-#line 1256 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1262 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
(yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
@@ -3703,7 +3709,7 @@
break;
case 283:
-#line 1261 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1267 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
(yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
@@ -3712,7 +3718,7 @@
break;
case 284:
-#line 1266 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1272 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
(yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
@@ -3721,7 +3727,7 @@
break;
case 285:
-#line 1271 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1277 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-1].String) += " " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -3730,7 +3736,7 @@
break;
case 286:
-#line 1276 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1282 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-5].String)->empty())
*(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
@@ -3751,22 +3757,22 @@
break;
case 288:
-#line 1298 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1304 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.ValList) = (yyvsp[0].ValList); ;}
break;
case 289:
-#line 1299 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1305 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.ValList) = new ValueList(); ;}
break;
case 291:
-#line 1304 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1310 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 292:
-#line 1307 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1313 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
if (!(yyvsp[0].String)->empty())
@@ -3777,7 +3783,7 @@
break;
case 293:
-#line 1314 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1320 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
if (!(yyvsp[0].String)->empty())
@@ -3788,7 +3794,7 @@
break;
case 294:
-#line 1321 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1327 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
if (!(yyvsp[0].String)->empty())
@@ -3799,7 +3805,7 @@
break;
case 295:
-#line 1328 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1334 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
if (!(yyvsp[0].String)->empty())
@@ -3810,7 +3816,7 @@
break;
case 296:
-#line 1335 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1341 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
(yyvsp[0].Value).destroy();
@@ -3819,7 +3825,7 @@
break;
case 297:
-#line 1340 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1346 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-3].String)->empty())
*(yyvsp[-3].String) += " ";
@@ -3830,7 +3836,7 @@
break;
case 298:
-#line 1347 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1353 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-5].String)->empty())
*(yyvsp[-5].String) += " ";
@@ -3841,7 +3847,7 @@
break;
case 299:
-#line 1354 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1360 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
// Upgrade the indices
for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
@@ -3872,7 +3878,7 @@
}
/* Line 1126 of yacc.c. */
-#line 3876 "UpgradeParser.tab.c"
+#line 3882 "UpgradeParser.tab.c"
yyvsp -= yylen;
yyssp -= yylen;
@@ -4140,7 +4146,7 @@
}
-#line 1378 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1384 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
int yyerror(const char *ErrorMsg) {
Index: llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs
diff -u llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs:1.22 llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs:1.23
--- llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs:1.22 Wed Dec 6 22:23:03 2006
+++ llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs Sat Dec 9 10:57:22 2006
@@ -552,10 +552,16 @@
// the original intent by replace the cast with a setne
const char* comparator = SrcTy.isPointer() ? ", null" :
(SrcTy.isFloatingPoint() ? ", 0.0" : ", 0");
- if (isConst)
- Result = "setne (" + Source + comparator + ")";
- else
- Result = "setne " + Source + comparator;
+#if UPGRADE_SETCOND_OPS
+ const char* compareOp = SrcTy.isFloatingPoint() ? "setne " : "icmp ne ";
+#else
+ const char* compareOp = "setne";
+#endif
+ if (isConst) {
+ Result = "(" + Source + comparator + ")";
+ Result = compareOp + Result;
+ } else
+ Result = compareOp + Source + comparator;
return Result; // skip cast processing below
}
ResolveType(SrcTy);
@@ -651,7 +657,7 @@
#endif
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 279 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 285 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
typedef union YYSTYPE {
std::string* String;
TypeInfo Type;
@@ -660,7 +666,7 @@
ValueList* ValList;
} YYSTYPE;
/* Line 196 of yacc.c. */
-#line 664 "UpgradeParser.tab.c"
+#line 670 "UpgradeParser.tab.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
@@ -672,7 +678,7 @@
/* Line 219 of yacc.c. */
-#line 676 "UpgradeParser.tab.c"
+#line 682 "UpgradeParser.tab.c"
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
@@ -1026,36 +1032,36 @@
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const unsigned short int yyrline[] =
{
- 0, 342, 342, 342, 343, 343, 347, 347, 347, 347,
- 347, 347, 347, 348, 348, 348, 348, 349, 349, 349,
- 350, 350, 350, 350, 350, 350, 351, 351, 351, 351,
- 351, 351, 351, 351, 351, 351, 352, 352, 352, 352,
- 352, 352, 352, 352, 352, 352, 353, 353, 353, 353,
- 353, 353, 354, 354, 354, 354, 355, 355, 355, 355,
- 355, 355, 355, 356, 356, 356, 356, 356, 356, 361,
- 361, 361, 361, 362, 362, 362, 362, 363, 363, 364,
- 364, 367, 370, 375, 375, 375, 375, 375, 375, 376,
- 377, 380, 380, 380, 380, 380, 381, 382, 387, 392,
- 393, 396, 397, 405, 411, 412, 415, 416, 425, 426,
- 439, 439, 440, 440, 441, 445, 445, 445, 445, 445,
- 445, 445, 446, 446, 446, 446, 446, 448, 452, 456,
- 459, 464, 470, 478, 486, 492, 496, 507, 510, 518,
- 519, 524, 527, 537, 543, 548, 554, 560, 566, 571,
- 577, 583, 589, 595, 601, 607, 613, 619, 625, 633,
- 647, 659, 664, 670, 675, 683, 688, 693, 701, 706,
- 711, 721, 726, 731, 731, 741, 746, 749, 754, 758,
- 762, 764, 764, 767, 779, 784, 789, 798, 807, 816,
- 825, 830, 835, 840, 842, 842, 845, 850, 857, 862,
- 869, 876, 881, 882, 890, 890, 891, 891, 893, 900,
- 904, 908, 911, 916, 919, 921, 941, 942, 944, 953,
- 954, 956, 964, 965, 966, 970, 983, 984, 987, 987,
- 987, 987, 987, 987, 987, 988, 989, 994, 995, 1004,
- 1004, 1008, 1014, 1025, 1031, 1034, 1042, 1046, 1051, 1054,
- 1060, 1060, 1062, 1067, 1072, 1077, 1085, 1092, 1098, 1118,
- 1123, 1129, 1134, 1142, 1151, 1158, 1166, 1170, 1177, 1178,
- 1182, 1187, 1190, 1196, 1201, 1209, 1214, 1219, 1224, 1232,
- 1246, 1251, 1256, 1261, 1266, 1271, 1276, 1293, 1298, 1299,
- 1303, 1304, 1307, 1314, 1321, 1328, 1335, 1340, 1347, 1354
+ 0, 348, 348, 348, 349, 349, 353, 353, 353, 353,
+ 353, 353, 353, 354, 354, 354, 354, 355, 355, 355,
+ 356, 356, 356, 356, 356, 356, 357, 357, 357, 357,
+ 357, 357, 357, 357, 357, 357, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 359, 359, 359, 359,
+ 359, 359, 360, 360, 360, 360, 361, 361, 361, 361,
+ 361, 361, 361, 362, 362, 362, 362, 362, 362, 367,
+ 367, 367, 367, 368, 368, 368, 368, 369, 369, 370,
+ 370, 373, 376, 381, 381, 381, 381, 381, 381, 382,
+ 383, 386, 386, 386, 386, 386, 387, 388, 393, 398,
+ 399, 402, 403, 411, 417, 418, 421, 422, 431, 432,
+ 445, 445, 446, 446, 447, 451, 451, 451, 451, 451,
+ 451, 451, 452, 452, 452, 452, 452, 454, 458, 462,
+ 465, 470, 476, 484, 492, 498, 502, 513, 516, 524,
+ 525, 530, 533, 543, 549, 554, 560, 566, 572, 577,
+ 583, 589, 595, 601, 607, 613, 619, 625, 631, 639,
+ 653, 665, 670, 676, 681, 689, 694, 699, 707, 712,
+ 717, 727, 732, 737, 737, 747, 752, 755, 760, 764,
+ 768, 770, 770, 773, 785, 790, 795, 804, 813, 822,
+ 831, 836, 841, 846, 848, 848, 851, 856, 863, 868,
+ 875, 882, 887, 888, 896, 896, 897, 897, 899, 906,
+ 910, 914, 917, 922, 925, 927, 947, 948, 950, 959,
+ 960, 962, 970, 971, 972, 976, 989, 990, 993, 993,
+ 993, 993, 993, 993, 993, 994, 995, 1000, 1001, 1010,
+ 1010, 1014, 1020, 1031, 1037, 1040, 1048, 1052, 1057, 1060,
+ 1066, 1066, 1068, 1073, 1078, 1083, 1091, 1098, 1104, 1124,
+ 1129, 1135, 1140, 1148, 1157, 1164, 1172, 1176, 1183, 1184,
+ 1188, 1193, 1196, 1202, 1207, 1215, 1220, 1225, 1230, 1238,
+ 1252, 1257, 1262, 1267, 1272, 1277, 1282, 1299, 1304, 1305,
+ 1309, 1310, 1313, 1320, 1327, 1334, 1341, 1346, 1353, 1360
};
#endif
@@ -2402,26 +2408,26 @@
switch (yyn)
{
case 81:
-#line 367 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 373 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = (yyvsp[-1].String);
;}
break;
case 82:
-#line 370 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 376 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = new std::string("");
;}
break;
case 90:
-#line 377 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 383 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(""); ;}
break;
case 97:
-#line 382 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 388 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-1].String) += *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -2430,27 +2436,27 @@
break;
case 98:
-#line 387 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 393 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(""); ;}
break;
case 99:
-#line 392 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 398 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 100:
-#line 393 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 399 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ *(yyvsp[-1].String) += " " + *(yyvsp[0].String); delete (yyvsp[0].String); (yyval.String) = (yyvsp[-1].String); ;}
break;
case 101:
-#line 396 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 402 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 102:
-#line 397 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 403 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyvsp[-1].String)->insert(0, ", ");
*(yyvsp[-1].String) += " " + *(yyvsp[0].String);
@@ -2460,7 +2466,7 @@
break;
case 103:
-#line 405 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 411 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-1].String) += " " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -2469,17 +2475,17 @@
break;
case 104:
-#line 411 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 417 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 106:
-#line 415 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 421 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 107:
-#line 416 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 422 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyvsp[-1].String)->insert(0, ", ");
if (!(yyvsp[0].String)->empty())
@@ -2490,7 +2496,7 @@
break;
case 109:
-#line 426 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 432 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-1].String) += " " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -2499,7 +2505,7 @@
break;
case 127:
-#line 448 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 454 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Type).newTy = (yyvsp[0].String);
(yyval.Type).oldTy = OpaqueTy;
@@ -2507,7 +2513,7 @@
break;
case 128:
-#line 452 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 458 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Type).newTy = (yyvsp[0].String);
(yyval.Type).oldTy = UnresolvedTy;
@@ -2515,14 +2521,14 @@
break;
case 129:
-#line 456 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 462 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Type) = (yyvsp[0].Type);
;}
break;
case 130:
-#line 459 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 465 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Type UpReference
(yyvsp[0].String)->insert(0, "\\");
(yyval.Type).newTy = (yyvsp[0].String);
@@ -2531,7 +2537,7 @@
break;
case 131:
-#line 464 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 470 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Function derived type?
*(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )";
delete (yyvsp[-1].String);
@@ -2541,7 +2547,7 @@
break;
case 132:
-#line 470 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 476 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Sized array type?
(yyvsp[-3].String)->insert(0,"[ ");
*(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " ]";
@@ -2553,7 +2559,7 @@
break;
case 133:
-#line 478 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 484 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Packed array type?
(yyvsp[-3].String)->insert(0,"< ");
*(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " >";
@@ -2565,7 +2571,7 @@
break;
case 134:
-#line 486 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 492 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Structure type?
(yyvsp[-1].String)->insert(0, "{ ");
*(yyvsp[-1].String) += " }";
@@ -2575,7 +2581,7 @@
break;
case 135:
-#line 492 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 498 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Empty structure type?
(yyval.Type).newTy = new std::string("{}");
(yyval.Type).oldTy = StructTy;
@@ -2583,7 +2589,7 @@
break;
case 136:
-#line 496 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 502 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Pointer type?
*(yyvsp[-1].Type).newTy += '*';
(yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
@@ -2593,14 +2599,14 @@
break;
case 137:
-#line 507 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 513 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = (yyvsp[0].Type).newTy;
;}
break;
case 138:
-#line 510 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 516 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy;
delete (yyvsp[0].Type).newTy;
@@ -2609,7 +2615,7 @@
break;
case 140:
-#line 519 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 525 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += ", ...";
delete (yyvsp[0].String);
@@ -2618,21 +2624,21 @@
break;
case 141:
-#line 524 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 530 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = (yyvsp[0].String);
;}
break;
case 142:
-#line 527 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 533 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = new std::string();
;}
break;
case 143:
-#line 537 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 543 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Nonempty unsized arr
(yyval.Const).type = (yyvsp[-3].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
@@ -2642,7 +2648,7 @@
break;
case 144:
-#line 543 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 549 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-2].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
@@ -2651,7 +2657,7 @@
break;
case 145:
-#line 548 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 554 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-2].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
@@ -2661,7 +2667,7 @@
break;
case 146:
-#line 554 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 560 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Nonempty unsized arr
(yyval.Const).type = (yyvsp[-3].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
@@ -2671,7 +2677,7 @@
break;
case 147:
-#line 560 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 566 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-3].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
@@ -2681,7 +2687,7 @@
break;
case 148:
-#line 566 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 572 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-2].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
@@ -2690,7 +2696,7 @@
break;
case 149:
-#line 571 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 577 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2700,7 +2706,7 @@
break;
case 150:
-#line 577 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 583 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2710,7 +2716,7 @@
break;
case 151:
-#line 583 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 589 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2720,7 +2726,7 @@
break;
case 152:
-#line 589 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 595 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2730,7 +2736,7 @@
break;
case 153:
-#line 595 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 601 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2740,7 +2746,7 @@
break;
case 154:
-#line 601 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 607 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // integral constants
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2750,7 +2756,7 @@
break;
case 155:
-#line 607 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 613 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // integral constants
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2760,7 +2766,7 @@
break;
case 156:
-#line 613 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 619 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Boolean constants
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2770,7 +2776,7 @@
break;
case 157:
-#line 619 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 625 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Boolean constants
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2780,7 +2786,7 @@
break;
case 158:
-#line 625 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 631 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Float & Double constants
(yyval.Const).type = (yyvsp[-1].Type);
(yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
@@ -2790,7 +2796,7 @@
break;
case 159:
-#line 633 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 639 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
std::string source = *(yyvsp[-3].Const).cnst;
TypeInfo DstTy = (yyvsp[-1].Type);
@@ -2808,7 +2814,7 @@
break;
case 160:
-#line 647 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 653 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst;
for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
@@ -2824,7 +2830,7 @@
break;
case 161:
-#line 659 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 665 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
(yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
@@ -2833,7 +2839,7 @@
break;
case 162:
-#line 664 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 670 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
const char* op = getDivRemOpcode(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
(yyval.String) = new std::string(op);
@@ -2843,7 +2849,7 @@
break;
case 163:
-#line 670 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 676 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
(yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
@@ -2852,7 +2858,7 @@
break;
case 164:
-#line 675 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 681 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
#if UPGRADE_SETCOND_OPS
*(yyvsp[-5].String) = getCompareOp(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
@@ -2864,7 +2870,7 @@
break;
case 165:
-#line 683 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 689 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
@@ -2873,7 +2879,7 @@
break;
case 166:
-#line 688 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 694 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
@@ -2882,7 +2888,7 @@
break;
case 167:
-#line 693 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 699 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
const char* shiftop = (yyvsp[-5].String)->c_str();
if (*(yyvsp[-5].String) == "shr")
@@ -2894,7 +2900,7 @@
break;
case 168:
-#line 701 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 707 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
(yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
@@ -2903,7 +2909,7 @@
break;
case 169:
-#line 706 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 712 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
(yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
@@ -2912,7 +2918,7 @@
break;
case 170:
-#line 711 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 717 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
(yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
@@ -2921,7 +2927,7 @@
break;
case 171:
-#line 721 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 727 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst;
(yyvsp[0].Const).destroy();
@@ -2930,25 +2936,25 @@
break;
case 172:
-#line 726 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 732 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;}
break;
case 175:
-#line 741 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 747 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
;}
break;
case 176:
-#line 746 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 752 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = 0;
;}
break;
case 177:
-#line 749 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 755 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << *(yyvsp[0].String) << "\n";
delete (yyvsp[0].String);
@@ -2957,7 +2963,7 @@
break;
case 178:
-#line 754 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 760 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << "module asm " << " " << *(yyvsp[0].String) << "\n";
(yyval.String) = 0;
@@ -2965,7 +2971,7 @@
break;
case 179:
-#line 758 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 764 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << "implementation\n";
(yyval.String) = 0;
@@ -2973,17 +2979,17 @@
break;
case 180:
-#line 762 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 768 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = 0; ;}
break;
case 182:
-#line 764 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 770 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = (yyvsp[0].String); *(yyval.String) = "external"; ;}
break;
case 183:
-#line 767 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 773 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
EnumeratedTypes.push_back((yyvsp[0].Type));
if (!(yyvsp[-2].String)->empty()) {
@@ -2999,7 +3005,7 @@
break;
case 184:
-#line 779 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 785 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Function prototypes can be in const pool
*O << *(yyvsp[0].String) << "\n";
delete (yyvsp[0].String);
@@ -3008,7 +3014,7 @@
break;
case 185:
-#line 784 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 790 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Asm blocks can be in the const pool
*O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
@@ -3017,7 +3023,7 @@
break;
case 186:
-#line 789 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 795 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-4].String)->empty()) {
*O << *(yyvsp[-4].String) << " = ";
@@ -3030,7 +3036,7 @@
break;
case 187:
-#line 798 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 804 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-4].String)->empty()) {
*O << *(yyvsp[-4].String) << " = ";
@@ -3043,7 +3049,7 @@
break;
case 188:
-#line 807 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 813 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-4].String)->empty()) {
*O << *(yyvsp[-4].String) << " = ";
@@ -3056,7 +3062,7 @@
break;
case 189:
-#line 816 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 822 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-4].String)->empty()) {
*O << *(yyvsp[-4].String) << " = ";
@@ -3069,7 +3075,7 @@
break;
case 190:
-#line 825 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 831 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
delete (yyvsp[-1].String); delete (yyvsp[0].String);
@@ -3078,7 +3084,7 @@
break;
case 191:
-#line 830 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 836 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << "\n";
delete (yyvsp[-2].String); delete (yyvsp[0].String);
@@ -3087,14 +3093,14 @@
break;
case 192:
-#line 835 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 841 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = 0;
;}
break;
case 196:
-#line 845 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 851 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -3103,7 +3109,7 @@
break;
case 197:
-#line 850 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 856 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
if (*(yyvsp[0].String) == "64")
@@ -3114,7 +3120,7 @@
break;
case 198:
-#line 857 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 863 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -3123,7 +3129,7 @@
break;
case 199:
-#line 862 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 868 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -3132,7 +3138,7 @@
break;
case 200:
-#line 869 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 875 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyvsp[-1].String)->insert(0, "[ ");
*(yyvsp[-1].String) += " ]";
@@ -3141,7 +3147,7 @@
break;
case 201:
-#line 876 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 882 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -3150,19 +3156,19 @@
break;
case 203:
-#line 882 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 888 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = new std::string();
;}
break;
case 207:
-#line 891 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 897 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 208:
-#line 893 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 899 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = (yyvsp[-1].Type).newTy;
if (!(yyvsp[0].String)->empty())
@@ -3172,7 +3178,7 @@
break;
case 209:
-#line 900 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 906 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -3180,21 +3186,21 @@
break;
case 210:
-#line 904 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 910 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = (yyvsp[0].String);
;}
break;
case 211:
-#line 908 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 914 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = (yyvsp[0].String);
;}
break;
case 212:
-#line 911 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 917 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += ", ...";
(yyval.String) = (yyvsp[-2].String);
@@ -3203,19 +3209,19 @@
break;
case 213:
-#line 916 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 922 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = (yyvsp[0].String);
;}
break;
case 214:
-#line 919 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 925 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 215:
-#line 922 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 928 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-7].String)->empty()) {
*(yyvsp[-7].String) += " ";
@@ -3237,17 +3243,17 @@
break;
case 216:
-#line 941 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 947 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string("{"); delete (yyvsp[0].String); ;}
break;
case 217:
-#line 942 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 948 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string ("{"); ;}
break;
case 218:
-#line 944 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 950 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-2].String)->empty()) {
*O << *(yyvsp[-2].String) << " ";
@@ -3259,17 +3265,17 @@
break;
case 219:
-#line 953 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 959 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string("}"); delete (yyvsp[0].String); ;}
break;
case 220:
-#line 954 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 960 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string("}"); ;}
break;
case 221:
-#line 956 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 962 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if ((yyvsp[-1].String))
*O << *(yyvsp[-1].String);
@@ -3279,12 +3285,12 @@
break;
case 222:
-#line 964 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 970 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 225:
-#line 970 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 976 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-1].String)->empty())
*(yyvsp[-2].String) += " " + *(yyvsp[-1].String);
@@ -3296,12 +3302,12 @@
break;
case 226:
-#line 983 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 989 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 236:
-#line 989 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 995 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyvsp[-1].String)->insert(0, "<");
*(yyvsp[-1].String) += ">";
@@ -3310,7 +3316,7 @@
break;
case 238:
-#line 995 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1001 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-3].String)->empty()) {
*(yyvsp[-4].String) += " " + *(yyvsp[-3].String);
@@ -3322,7 +3328,7 @@
break;
case 241:
-#line 1008 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1014 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Value).val = (yyvsp[0].String);
(yyval.Value).constant = false;
@@ -3332,7 +3338,7 @@
break;
case 242:
-#line 1014 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1020 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Value).val = (yyvsp[0].String);
(yyval.Value).constant = true;
@@ -3342,7 +3348,7 @@
break;
case 243:
-#line 1025 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1031 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.Value) = (yyvsp[0].Value);
(yyval.Value).type = (yyvsp[-1].Type);
@@ -3351,28 +3357,28 @@
break;
case 244:
-#line 1031 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1037 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = 0;
;}
break;
case 245:
-#line 1034 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1040 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Do not allow functions with 0 basic blocks
(yyval.String) = 0;
;}
break;
case 246:
-#line 1042 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1048 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = 0;
;}
break;
case 247:
-#line 1046 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1052 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << " " << *(yyvsp[0].String) << "\n";
delete (yyvsp[0].String);
@@ -3381,14 +3387,14 @@
break;
case 248:
-#line 1051 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1057 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.String) = 0;
;}
break;
case 249:
-#line 1054 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1060 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << *(yyvsp[0].String) << "\n";
delete (yyvsp[0].String);
@@ -3397,12 +3403,12 @@
break;
case 251:
-#line 1060 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1066 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = (yyvsp[0].String); *(yyval.String) = "unwind"; ;}
break;
case 252:
-#line 1062 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1068 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Return with a result...
*O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Value).val << "\n";
delete (yyvsp[-1].String); (yyvsp[0].Value).destroy();
@@ -3411,7 +3417,7 @@
break;
case 253:
-#line 1067 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1073 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Return with no result...
*O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
@@ -3420,7 +3426,7 @@
break;
case 254:
-#line 1072 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1078 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Unconditional Branch...
*O << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
@@ -3429,7 +3435,7 @@
break;
case 255:
-#line 1077 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1083 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
<< *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << ", " << *(yyvsp[-1].Type).newTy << " "
@@ -3441,7 +3447,7 @@
break;
case 256:
-#line 1085 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1091 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
<< *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " [" << *(yyvsp[-1].String) << " ]\n";
@@ -3452,7 +3458,7 @@
break;
case 257:
-#line 1092 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1098 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << " " << *(yyvsp[-7].String) << " " << *(yyvsp[-6].Type).newTy << " " << *(yyvsp[-5].Value).val << ", "
<< *(yyvsp[-3].Type).newTy << " " << *(yyvsp[-2].Value).val << "[]\n";
@@ -3462,7 +3468,7 @@
break;
case 258:
-#line 1099 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1105 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << " ";
if (!(yyvsp[-13].String)->empty())
@@ -3485,7 +3491,7 @@
break;
case 259:
-#line 1118 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1124 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << " " << *(yyvsp[0].String) << "\n";
delete (yyvsp[0].String);
@@ -3494,7 +3500,7 @@
break;
case 260:
-#line 1123 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1129 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*O << " " << *(yyvsp[0].String) << "\n";
delete (yyvsp[0].String);
@@ -3503,7 +3509,7 @@
break;
case 261:
-#line 1129 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1135 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
(yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
@@ -3512,7 +3518,7 @@
break;
case 262:
-#line 1134 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1140 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " );
*(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
@@ -3522,7 +3528,7 @@
break;
case 263:
-#line 1142 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1148 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-1].String)->empty())
*(yyvsp[-1].String) += " = ";
@@ -3533,7 +3539,7 @@
break;
case 264:
-#line 1151 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1157 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ // Used for PHI nodes
(yyvsp[-3].Value).val->insert(0, *(yyvsp[-5].Type).newTy + "[");
*(yyvsp[-3].Value).val += "," + *(yyvsp[-1].Value).val + "]";
@@ -3544,7 +3550,7 @@
break;
case 265:
-#line 1158 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1164 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-6].String) += ", [" + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + "]";
(yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
@@ -3553,7 +3559,7 @@
break;
case 266:
-#line 1166 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1172 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyval.ValList) = new ValueList();
(yyval.ValList)->push_back((yyvsp[0].Value));
@@ -3561,7 +3567,7 @@
break;
case 267:
-#line 1170 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1176 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
(yyvsp[-2].ValList)->push_back((yyvsp[0].Value));
(yyval.ValList) = (yyvsp[-2].ValList);
@@ -3569,17 +3575,17 @@
break;
case 268:
-#line 1177 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1183 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.ValList) = (yyvsp[0].ValList); ;}
break;
case 269:
-#line 1178 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1184 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.ValList) = new ValueList(); ;}
break;
case 270:
-#line 1182 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1188 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-1].String) += " " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -3588,7 +3594,7 @@
break;
case 272:
-#line 1190 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1196 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
const char* op = getDivRemOpcode(*(yyvsp[-4].String), (yyvsp[-3].Type));
(yyval.String) = new std::string(op);
@@ -3598,7 +3604,7 @@
break;
case 273:
-#line 1196 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1202 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
(yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
@@ -3607,7 +3613,7 @@
break;
case 274:
-#line 1201 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1207 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
#if UPGRADE_SETCOND_OPS
*(yyvsp[-4].String) = getCompareOp(*(yyvsp[-4].String), (yyvsp[-3].Type));
@@ -3619,7 +3625,7 @@
break;
case 275:
-#line 1209 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1215 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")";
delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
@@ -3628,7 +3634,7 @@
break;
case 276:
-#line 1214 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1220 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")";
delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
@@ -3637,7 +3643,7 @@
break;
case 277:
-#line 1219 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1225 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
(yyvsp[0].Value).destroy();
@@ -3646,7 +3652,7 @@
break;
case 278:
-#line 1224 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1230 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
const char* shiftop = (yyvsp[-3].String)->c_str();
if (*(yyvsp[-3].String) == "shr")
@@ -3658,7 +3664,7 @@
break;
case 279:
-#line 1232 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1238 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
std::string source = *(yyvsp[-2].Value).val;
TypeInfo SrcTy = (yyvsp[-2].Value).type;
@@ -3676,7 +3682,7 @@
break;
case 280:
-#line 1246 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1252 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
(yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
@@ -3685,7 +3691,7 @@
break;
case 281:
-#line 1251 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1257 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy;
(yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy();
@@ -3694,7 +3700,7 @@
break;
case 282:
-#line 1256 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1262 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
(yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
@@ -3703,7 +3709,7 @@
break;
case 283:
-#line 1261 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1267 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
(yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
@@ -3712,7 +3718,7 @@
break;
case 284:
-#line 1266 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1272 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
(yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
@@ -3721,7 +3727,7 @@
break;
case 285:
-#line 1271 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1277 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-1].String) += " " + *(yyvsp[0].String);
delete (yyvsp[0].String);
@@ -3730,7 +3736,7 @@
break;
case 286:
-#line 1276 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1282 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-5].String)->empty())
*(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
@@ -3751,22 +3757,22 @@
break;
case 288:
-#line 1298 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1304 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.ValList) = (yyvsp[0].ValList); ;}
break;
case 289:
-#line 1299 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1305 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.ValList) = new ValueList(); ;}
break;
case 291:
-#line 1304 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1310 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{ (yyval.String) = new std::string(); ;}
break;
case 292:
-#line 1307 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1313 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
if (!(yyvsp[0].String)->empty())
@@ -3777,7 +3783,7 @@
break;
case 293:
-#line 1314 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1320 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
if (!(yyvsp[0].String)->empty())
@@ -3788,7 +3794,7 @@
break;
case 294:
-#line 1321 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1327 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
if (!(yyvsp[0].String)->empty())
@@ -3799,7 +3805,7 @@
break;
case 295:
-#line 1328 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1334 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
if (!(yyvsp[0].String)->empty())
@@ -3810,7 +3816,7 @@
break;
case 296:
-#line 1335 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1341 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
*(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
(yyvsp[0].Value).destroy();
@@ -3819,7 +3825,7 @@
break;
case 297:
-#line 1340 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1346 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-3].String)->empty())
*(yyvsp[-3].String) += " ";
@@ -3830,7 +3836,7 @@
break;
case 298:
-#line 1347 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1353 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
if (!(yyvsp[-5].String)->empty())
*(yyvsp[-5].String) += " ";
@@ -3841,7 +3847,7 @@
break;
case 299:
-#line 1354 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1360 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
{
// Upgrade the indices
for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
@@ -3872,7 +3878,7 @@
}
/* Line 1126 of yacc.c. */
-#line 3876 "UpgradeParser.tab.c"
+#line 3882 "UpgradeParser.tab.c"
yyvsp -= yylen;
yyssp -= yylen;
@@ -4140,7 +4146,7 @@
}
-#line 1378 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1384 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
int yyerror(const char *ErrorMsg) {
Index: llvm/tools/llvm-upgrade/UpgradeParser.h
diff -u llvm/tools/llvm-upgrade/UpgradeParser.h:1.18 llvm/tools/llvm-upgrade/UpgradeParser.h:1.19
--- llvm/tools/llvm-upgrade/UpgradeParser.h:1.18 Wed Dec 6 22:23:03 2006
+++ llvm/tools/llvm-upgrade/UpgradeParser.h Sat Dec 9 10:57:22 2006
@@ -333,7 +333,7 @@
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 279 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 285 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
typedef union YYSTYPE {
std::string* String;
TypeInfo Type;
Index: llvm/tools/llvm-upgrade/UpgradeParser.h.cvs
diff -u llvm/tools/llvm-upgrade/UpgradeParser.h.cvs:1.16 llvm/tools/llvm-upgrade/UpgradeParser.h.cvs:1.17
--- llvm/tools/llvm-upgrade/UpgradeParser.h.cvs:1.16 Wed Dec 6 22:23:03 2006
+++ llvm/tools/llvm-upgrade/UpgradeParser.h.cvs Sat Dec 9 10:57:22 2006
@@ -333,7 +333,7 @@
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 279 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 285 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
typedef union YYSTYPE {
std::string* String;
TypeInfo Type;
Index: llvm/tools/llvm-upgrade/UpgradeParser.y.cvs
diff -u llvm/tools/llvm-upgrade/UpgradeParser.y.cvs:1.21 llvm/tools/llvm-upgrade/UpgradeParser.y.cvs:1.22
--- llvm/tools/llvm-upgrade/UpgradeParser.y.cvs:1.21 Wed Dec 6 22:23:03 2006
+++ llvm/tools/llvm-upgrade/UpgradeParser.y.cvs Sat Dec 9 10:57:22 2006
@@ -194,10 +194,16 @@
// the original intent by replace the cast with a setne
const char* comparator = SrcTy.isPointer() ? ", null" :
(SrcTy.isFloatingPoint() ? ", 0.0" : ", 0");
- if (isConst)
- Result = "setne (" + Source + comparator + ")";
- else
- Result = "setne " + Source + comparator;
+#if UPGRADE_SETCOND_OPS
+ const char* compareOp = SrcTy.isFloatingPoint() ? "setne " : "icmp ne ";
+#else
+ const char* compareOp = "setne";
+#endif
+ if (isConst) {
+ Result = "(" + Source + comparator + ")";
+ Result = compareOp + Result;
+ } else
+ Result = compareOp + Source + comparator;
return Result; // skip cast processing below
}
ResolveType(SrcTy);
More information about the llvm-commits
mailing list