diff options
Diffstat (limited to 'tools/llvm-upgrade/UpgradeParser.cpp')
-rw-r--r-- | tools/llvm-upgrade/UpgradeParser.cpp | 2278 |
1 files changed, 1127 insertions, 1151 deletions
diff --git a/tools/llvm-upgrade/UpgradeParser.cpp b/tools/llvm-upgrade/UpgradeParser.cpp index 702bb09b42..a65dd09454 100644 --- a/tools/llvm-upgrade/UpgradeParser.cpp +++ b/tools/llvm-upgrade/UpgradeParser.cpp @@ -96,123 +96,122 @@ BEGINTOK = 287, ENDTOK = 288, DECLARE = 289, - DEFINE = 290, - GLOBAL = 291, - CONSTANT = 292, - SECTION = 293, - VOLATILE = 294, - TO = 295, - DOTDOTDOT = 296, - CONST = 297, - INTERNAL = 298, - LINKONCE = 299, - WEAK = 300, - DLLIMPORT = 301, - DLLEXPORT = 302, - EXTERN_WEAK = 303, - APPENDING = 304, - NOT = 305, - EXTERNAL = 306, - TARGET = 307, - TRIPLE = 308, - ENDIAN = 309, - POINTERSIZE = 310, - LITTLE = 311, - BIG = 312, - ALIGN = 313, - UNINITIALIZED = 314, - DEPLIBS = 315, - CALL = 316, - TAIL = 317, - ASM_TOK = 318, - MODULE = 319, - SIDEEFFECT = 320, - CC_TOK = 321, - CCC_TOK = 322, - CSRETCC_TOK = 323, - FASTCC_TOK = 324, - COLDCC_TOK = 325, - X86_STDCALLCC_TOK = 326, - X86_FASTCALLCC_TOK = 327, - DATALAYOUT = 328, - RET = 329, - BR = 330, - SWITCH = 331, - INVOKE = 332, - EXCEPT = 333, - UNWIND = 334, - UNREACHABLE = 335, - ADD = 336, - SUB = 337, - MUL = 338, - DIV = 339, - UDIV = 340, - SDIV = 341, - FDIV = 342, - REM = 343, - UREM = 344, - SREM = 345, - FREM = 346, - AND = 347, - OR = 348, - XOR = 349, - SETLE = 350, - SETGE = 351, - SETLT = 352, - SETGT = 353, - SETEQ = 354, - SETNE = 355, - ICMP = 356, - FCMP = 357, - EQ = 358, - NE = 359, - SLT = 360, - SGT = 361, - SLE = 362, - SGE = 363, - OEQ = 364, - ONE = 365, - OLT = 366, - OGT = 367, - OLE = 368, - OGE = 369, - ORD = 370, - UNO = 371, - UEQ = 372, - UNE = 373, - ULT = 374, - UGT = 375, - ULE = 376, - UGE = 377, - MALLOC = 378, - ALLOCA = 379, - FREE = 380, - LOAD = 381, - STORE = 382, - GETELEMENTPTR = 383, - PHI_TOK = 384, - SELECT = 385, - SHL = 386, - SHR = 387, - ASHR = 388, - LSHR = 389, - VAARG = 390, - EXTRACTELEMENT = 391, - INSERTELEMENT = 392, - SHUFFLEVECTOR = 393, - CAST = 394, - TRUNC = 395, - ZEXT = 396, - SEXT = 397, - FPTRUNC = 398, - FPEXT = 399, - FPTOUI = 400, - FPTOSI = 401, - UITOFP = 402, - SITOFP = 403, - PTRTOINT = 404, - INTTOPTR = 405, - BITCAST = 406 + GLOBAL = 290, + CONSTANT = 291, + SECTION = 292, + VOLATILE = 293, + TO = 294, + DOTDOTDOT = 295, + CONST = 296, + INTERNAL = 297, + LINKONCE = 298, + WEAK = 299, + DLLIMPORT = 300, + DLLEXPORT = 301, + EXTERN_WEAK = 302, + APPENDING = 303, + NOT = 304, + EXTERNAL = 305, + TARGET = 306, + TRIPLE = 307, + ENDIAN = 308, + POINTERSIZE = 309, + LITTLE = 310, + BIG = 311, + ALIGN = 312, + UNINITIALIZED = 313, + DEPLIBS = 314, + CALL = 315, + TAIL = 316, + ASM_TOK = 317, + MODULE = 318, + SIDEEFFECT = 319, + CC_TOK = 320, + CCC_TOK = 321, + CSRETCC_TOK = 322, + FASTCC_TOK = 323, + COLDCC_TOK = 324, + X86_STDCALLCC_TOK = 325, + X86_FASTCALLCC_TOK = 326, + DATALAYOUT = 327, + RET = 328, + BR = 329, + SWITCH = 330, + INVOKE = 331, + EXCEPT = 332, + UNWIND = 333, + UNREACHABLE = 334, + ADD = 335, + SUB = 336, + MUL = 337, + DIV = 338, + UDIV = 339, + SDIV = 340, + FDIV = 341, + REM = 342, + UREM = 343, + SREM = 344, + FREM = 345, + AND = 346, + OR = 347, + XOR = 348, + SETLE = 349, + SETGE = 350, + SETLT = 351, + SETGT = 352, + SETEQ = 353, + SETNE = 354, + ICMP = 355, + FCMP = 356, + EQ = 357, + NE = 358, + SLT = 359, + SGT = 360, + SLE = 361, + SGE = 362, + OEQ = 363, + ONE = 364, + OLT = 365, + OGT = 366, + OLE = 367, + OGE = 368, + ORD = 369, + UNO = 370, + UEQ = 371, + UNE = 372, + ULT = 373, + UGT = 374, + ULE = 375, + UGE = 376, + MALLOC = 377, + ALLOCA = 378, + FREE = 379, + LOAD = 380, + STORE = 381, + GETELEMENTPTR = 382, + PHI_TOK = 383, + SELECT = 384, + SHL = 385, + SHR = 386, + ASHR = 387, + LSHR = 388, + VAARG = 389, + EXTRACTELEMENT = 390, + INSERTELEMENT = 391, + SHUFFLEVECTOR = 392, + CAST = 393, + TRUNC = 394, + ZEXT = 395, + SEXT = 396, + FPTRUNC = 397, + FPEXT = 398, + FPTOUI = 399, + FPTOSI = 400, + UITOFP = 401, + SITOFP = 402, + PTRTOINT = 403, + INTTOPTR = 404, + BITCAST = 405 }; #endif /* Tokens. */ @@ -248,129 +247,128 @@ #define BEGINTOK 287 #define ENDTOK 288 #define DECLARE 289 -#define DEFINE 290 -#define GLOBAL 291 -#define CONSTANT 292 -#define SECTION 293 -#define VOLATILE 294 -#define TO 295 -#define DOTDOTDOT 296 -#define CONST 297 -#define INTERNAL 298 -#define LINKONCE 299 -#define WEAK 300 -#define DLLIMPORT 301 -#define DLLEXPORT 302 -#define EXTERN_WEAK 303 -#define APPENDING 304 -#define NOT 305 -#define EXTERNAL 306 -#define TARGET 307 -#define TRIPLE 308 -#define ENDIAN 309 -#define POINTERSIZE 310 -#define LITTLE 311 -#define BIG 312 -#define ALIGN 313 -#define UNINITIALIZED 314 -#define DEPLIBS 315 -#define CALL 316 -#define TAIL 317 -#define ASM_TOK 318 -#define MODULE 319 -#define SIDEEFFECT 320 -#define CC_TOK 321 -#define CCC_TOK 322 -#define CSRETCC_TOK 323 -#define FASTCC_TOK 324 -#define COLDCC_TOK 325 -#define X86_STDCALLCC_TOK 326 -#define X86_FASTCALLCC_TOK 327 -#define DATALAYOUT 328 -#define RET 329 -#define BR 330 -#define SWITCH 331 -#define INVOKE 332 -#define EXCEPT 333 -#define UNWIND 334 -#define UNREACHABLE 335 -#define ADD 336 -#define SUB 337 -#define MUL 338 -#define DIV 339 -#define UDIV 340 -#define SDIV 341 -#define FDIV 342 -#define REM 343 -#define UREM 344 -#define SREM 345 -#define FREM 346 -#define AND 347 -#define OR 348 -#define XOR 349 -#define SETLE 350 -#define SETGE 351 -#define SETLT 352 -#define SETGT 353 -#define SETEQ 354 -#define SETNE 355 -#define ICMP 356 -#define FCMP 357 -#define EQ 358 -#define NE 359 -#define SLT 360 -#define SGT 361 -#define SLE 362 -#define SGE 363 -#define OEQ 364 -#define ONE 365 -#define OLT 366 -#define OGT 367 -#define OLE 368 -#define OGE 369 -#define ORD 370 -#define UNO 371 -#define UEQ 372 -#define UNE 373 -#define ULT 374 -#define UGT 375 -#define ULE 376 -#define UGE 377 -#define MALLOC 378 -#define ALLOCA 379 -#define FREE 380 -#define LOAD 381 -#define STORE 382 -#define GETELEMENTPTR 383 -#define PHI_TOK 384 -#define SELECT 385 -#define SHL 386 -#define SHR 387 -#define ASHR 388 -#define LSHR 389 -#define VAARG 390 -#define EXTRACTELEMENT 391 -#define INSERTELEMENT 392 -#define SHUFFLEVECTOR 393 -#define CAST 394 -#define TRUNC 395 -#define ZEXT 396 -#define SEXT 397 -#define FPTRUNC 398 -#define FPEXT 399 -#define FPTOUI 400 -#define FPTOSI 401 -#define UITOFP 402 -#define SITOFP 403 -#define PTRTOINT 404 -#define INTTOPTR 405 -#define BITCAST 406 +#define GLOBAL 290 +#define CONSTANT 291 +#define SECTION 292 +#define VOLATILE 293 +#define TO 294 +#define DOTDOTDOT 295 +#define CONST 296 +#define INTERNAL 297 +#define LINKONCE 298 +#define WEAK 299 +#define DLLIMPORT 300 +#define DLLEXPORT 301 +#define EXTERN_WEAK 302 +#define APPENDING 303 +#define NOT 304 +#define EXTERNAL 305 +#define TARGET 306 +#define TRIPLE 307 +#define ENDIAN 308 +#define POINTERSIZE 309 +#define LITTLE 310 +#define BIG 311 +#define ALIGN 312 +#define UNINITIALIZED 313 +#define DEPLIBS 314 +#define CALL 315 +#define TAIL 316 +#define ASM_TOK 317 +#define MODULE 318 +#define SIDEEFFECT 319 +#define CC_TOK 320 +#define CCC_TOK 321 +#define CSRETCC_TOK 322 +#define FASTCC_TOK 323 +#define COLDCC_TOK 324 +#define X86_STDCALLCC_TOK 325 +#define X86_FASTCALLCC_TOK 326 +#define DATALAYOUT 327 +#define RET 328 +#define BR 329 +#define SWITCH 330 +#define INVOKE 331 +#define EXCEPT 332 +#define UNWIND 333 +#define UNREACHABLE 334 +#define ADD 335 +#define SUB 336 +#define MUL 337 +#define DIV 338 +#define UDIV 339 +#define SDIV 340 +#define FDIV 341 +#define REM 342 +#define UREM 343 +#define SREM 344 +#define FREM 345 +#define AND 346 +#define OR 347 +#define XOR 348 +#define SETLE 349 +#define SETGE 350 +#define SETLT 351 +#define SETGT 352 +#define SETEQ 353 +#define SETNE 354 +#define ICMP 355 +#define FCMP 356 +#define EQ 357 +#define NE 358 +#define SLT 359 +#define SGT 360 +#define SLE 361 +#define SGE 362 +#define OEQ 363 +#define ONE 364 +#define OLT 365 +#define OGT 366 +#define OLE 367 +#define OGE 368 +#define ORD 369 +#define UNO 370 +#define UEQ 371 +#define UNE 372 +#define ULT 373 +#define UGT 374 +#define ULE 375 +#define UGE 376 +#define MALLOC 377 +#define ALLOCA 378 +#define FREE 379 +#define LOAD 380 +#define STORE 381 +#define GETELEMENTPTR 382 +#define PHI_TOK 383 +#define SELECT 384 +#define SHL 385 +#define SHR 386 +#define ASHR 387 +#define LSHR 388 +#define VAARG 389 +#define EXTRACTELEMENT 390 +#define INSERTELEMENT 391 +#define SHUFFLEVECTOR 392 +#define CAST 393 +#define TRUNC 394 +#define ZEXT 395 +#define SEXT 396 +#define FPTRUNC 397 +#define FPEXT 398 +#define FPTOUI 399 +#define FPTOSI 400 +#define UITOFP 401 +#define SITOFP 402 +#define PTRTOINT 403 +#define INTTOPTR 404 +#define BITCAST 405 /* Copy the first part of user declarations. */ -#line 14 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 14 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" #include "ParserInternals.h" #include <llvm/ADT/StringExtras.h> @@ -394,6 +392,10 @@ std::istream* LexInput = 0; unsigned SizeOfPointer = 32; static uint64_t unique = 1; +// This bool controls whether attributes are ever added to function declarations +// definitions and calls. +static bool AddAttributes = false; + typedef std::vector<TypeInfo> TypeVector; static TypeVector EnumeratedTypes; typedef std::map<std::string,TypeInfo> TypeMap; @@ -410,12 +412,13 @@ void destroy(ValueList* VL) { } void UpgradeAssembly(const std::string &infile, std::istream& in, - std::ostream &out, bool debug) + std::ostream &out, bool debug, bool addAttrs) { Upgradelineno = 1; CurFilename = infile; LexInput = ∈ yydebug = debug; + AddAttributes = addAttrs; O = &out; if (yyparse()) { @@ -536,15 +539,15 @@ static std::string getCastUpgrade( // fp -> ptr cast is no longer supported but we must upgrade this // by doing a double cast: fp -> int -> ptr if (isConst) - Source = "ulong fptoui(" + Source + " to ulong)"; + Source = "i64 fptoui(" + Source + " to i64)"; else { *O << " %cast_upgrade" << unique << " = fptoui " << Source - << " to ulong\n"; - Source = "ulong %cast_upgrade" + llvm::utostr(unique); + << " to i64\n"; + Source = "i64 %cast_upgrade" + llvm::utostr(unique); } // Update the SrcTy for the getCastOpcode call below SrcTy.destroy(); - SrcTy.newTy = new std::string("ulong"); + SrcTy.newTy = new std::string("i64"); SrcTy.oldTy = ULongTy; } else if (DstTy.oldTy == BoolTy && SrcTy.oldTy != BoolTy) { // cast ptr %x to bool was previously defined as setne ptr %x, null @@ -649,7 +652,7 @@ getCompareOp(const std::string& setcc, const TypeInfo& TI) { #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 275 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 280 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" typedef union YYSTYPE { std::string* String; TypeInfo Type; @@ -658,7 +661,7 @@ typedef union YYSTYPE { ValueList* ValList; } YYSTYPE; /* Line 196 of yacc.c. */ -#line 662 "UpgradeParser.tab.c" +#line 665 "UpgradeParser.tab.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -670,7 +673,7 @@ typedef union YYSTYPE { /* Line 219 of yacc.c. */ -#line 674 "UpgradeParser.tab.c" +#line 677 "UpgradeParser.tab.c" #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ @@ -821,20 +824,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1554 +#define YYLAST 1486 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 166 +#define YYNTOKENS 165 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 75 /* YYNRULES -- Number of rules. */ -#define YYNRULES 302 +#define YYNRULES 301 /* YYNRULES -- Number of states. */ -#define YYNSTATES 590 +#define YYNSTATES 586 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 406 +#define YYMAXUTOK 405 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -846,15 +849,15 @@ static const unsigned char yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 155, 156, 164, 2, 153, 2, 2, 2, 2, 2, + 154, 155, 163, 2, 152, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 160, 152, 161, 2, 2, 2, 2, 2, 2, 2, + 159, 151, 160, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 157, 154, 159, 2, 2, 2, 2, 2, 165, + 2, 156, 153, 158, 2, 2, 2, 2, 2, 164, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 158, 2, 2, 162, 2, 163, 2, 2, 2, 2, + 157, 2, 2, 161, 2, 162, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -882,7 +885,7 @@ static const unsigned char yytranslate[] = 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151 + 145, 146, 147, 148, 149, 150 }; #if YYDEBUG @@ -912,151 +915,151 @@ static const unsigned short int yyprhs[] = 524, 531, 538, 542, 547, 548, 550, 552, 554, 558, 562, 566, 570, 574, 578, 580, 581, 583, 585, 587, 588, 591, 595, 597, 599, 603, 605, 606, 615, 617, - 619, 623, 628, 630, 632, 636, 637, 639, 641, 645, - 646, 648, 650, 652, 654, 656, 658, 660, 662, 664, - 668, 670, 676, 678, 680, 682, 684, 687, 690, 692, - 695, 698, 699, 701, 703, 705, 708, 711, 715, 725, - 735, 744, 759, 761, 763, 770, 776, 779, 786, 794, - 796, 800, 802, 803, 806, 808, 814, 820, 826, 833, - 840, 843, 848, 853, 860, 865, 870, 877, 884, 887, - 895, 897, 900, 901, 903, 904, 908, 915, 919, 926, - 929, 934, 941 + 619, 623, 625, 627, 631, 632, 634, 636, 640, 641, + 643, 645, 647, 649, 651, 653, 655, 657, 659, 663, + 665, 671, 673, 675, 677, 679, 682, 685, 687, 690, + 693, 694, 696, 698, 700, 703, 706, 710, 720, 730, + 739, 754, 756, 758, 765, 771, 774, 781, 789, 791, + 795, 797, 798, 801, 803, 809, 815, 821, 828, 835, + 838, 843, 848, 855, 860, 865, 872, 879, 882, 890, + 892, 895, 896, 898, 899, 903, 910, 914, 921, 924, + 929, 936 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const short int yyrhs[] = { - 200, 0, -1, 19, -1, 20, -1, 17, -1, 18, - -1, 81, -1, 82, -1, 83, -1, 84, -1, 85, - -1, 86, -1, 87, -1, 88, -1, 89, -1, 90, - -1, 91, -1, 92, -1, 93, -1, 94, -1, 95, - -1, 96, -1, 97, -1, 98, -1, 99, -1, 100, - -1, 103, -1, 104, -1, 105, -1, 106, -1, 107, - -1, 108, -1, 119, -1, 120, -1, 121, -1, 122, - -1, 109, -1, 110, -1, 111, -1, 112, -1, 113, - -1, 114, -1, 115, -1, 116, -1, 117, -1, 118, - -1, 119, -1, 120, -1, 121, -1, 122, -1, 25, - -1, 26, -1, 131, -1, 132, -1, 133, -1, 134, - -1, 140, -1, 141, -1, 142, -1, 143, -1, 144, - -1, 145, -1, 146, -1, 147, -1, 148, -1, 149, - -1, 150, -1, 151, -1, 139, -1, 11, -1, 9, + 199, 0, -1, 19, -1, 20, -1, 17, -1, 18, + -1, 80, -1, 81, -1, 82, -1, 83, -1, 84, + -1, 85, -1, 86, -1, 87, -1, 88, -1, 89, + -1, 90, -1, 91, -1, 92, -1, 93, -1, 94, + -1, 95, -1, 96, -1, 97, -1, 98, -1, 99, + -1, 102, -1, 103, -1, 104, -1, 105, -1, 106, + -1, 107, -1, 118, -1, 119, -1, 120, -1, 121, + -1, 108, -1, 109, -1, 110, -1, 111, -1, 112, + -1, 113, -1, 114, -1, 115, -1, 116, -1, 117, + -1, 118, -1, 119, -1, 120, -1, 121, -1, 25, + -1, 26, -1, 130, -1, 131, -1, 132, -1, 133, + -1, 139, -1, 140, -1, 141, -1, 142, -1, 143, + -1, 144, -1, 145, -1, 146, -1, 147, -1, 148, + -1, 149, -1, 150, -1, 138, -1, 11, -1, 9, -1, 7, -1, 5, -1, 12, -1, 10, -1, 8, - -1, 6, -1, 176, -1, 177, -1, 13, -1, 14, - -1, 209, 152, -1, -1, 43, -1, 44, -1, 45, - -1, 49, -1, 46, -1, 47, -1, 48, -1, -1, - 67, -1, 68, -1, 69, -1, 70, -1, 71, -1, - 72, -1, 66, 18, -1, -1, -1, 58, 18, -1, - -1, 153, 58, 18, -1, 38, 30, -1, -1, 185, - -1, -1, 153, 188, 187, -1, 185, -1, 58, 18, - -1, 191, -1, 3, -1, 193, -1, 3, -1, 193, + -1, 6, -1, 175, -1, 176, -1, 13, -1, 14, + -1, 208, 151, -1, -1, 42, -1, 43, -1, 44, + -1, 48, -1, 45, -1, 46, -1, 47, -1, -1, + 66, -1, 67, -1, 68, -1, 69, -1, 70, -1, + 71, -1, 65, 18, -1, -1, -1, 57, 18, -1, + -1, 152, 57, 18, -1, 37, 30, -1, -1, 184, + -1, -1, 152, 187, 186, -1, 184, -1, 57, 18, + -1, 190, -1, 3, -1, 192, -1, 3, -1, 192, -1, 4, -1, 5, -1, 6, -1, 7, -1, 8, -1, 9, -1, 10, -1, 11, -1, 12, -1, 13, - -1, 14, -1, 15, -1, 16, -1, 223, -1, 192, - -1, 154, 18, -1, 190, 155, 195, 156, -1, 157, - 18, 158, 193, 159, -1, 160, 18, 158, 193, 161, - -1, 162, 194, 163, -1, 162, 163, -1, 160, 162, - 194, 163, 161, -1, 160, 162, 163, 161, -1, 193, - 164, -1, 193, -1, 194, 153, 193, -1, 194, -1, - 194, 153, 41, -1, 41, -1, -1, 191, 157, 198, - 159, -1, 191, 157, 159, -1, 191, 165, 30, -1, - 191, 160, 198, 161, -1, 191, 162, 198, 163, -1, - 191, 162, 163, -1, 191, 22, -1, 191, 23, -1, - 191, 223, -1, 191, 197, -1, 191, 24, -1, 176, - 168, -1, 177, 18, -1, 4, 25, -1, 4, 26, - -1, 179, 21, -1, 175, 155, 196, 40, 191, 156, - -1, 128, 155, 196, 238, 156, -1, 130, 155, 196, - 153, 196, 153, 196, 156, -1, 169, 155, 196, 153, - 196, 156, -1, 170, 155, 196, 153, 196, 156, -1, - 171, 155, 196, 153, 196, 156, -1, 101, 172, 155, - 196, 153, 196, 156, -1, 102, 173, 155, 196, 153, - 196, 156, -1, 174, 155, 196, 153, 196, 156, -1, - 136, 155, 196, 153, 196, 156, -1, 137, 155, 196, - 153, 196, 153, 196, 156, -1, 138, 155, 196, 153, - 196, 153, 196, 156, -1, 198, 153, 196, -1, 196, - -1, 36, -1, 37, -1, 201, -1, 201, 218, -1, - 201, 220, -1, 201, 64, 63, 204, -1, 201, 31, - -1, 203, -1, 51, -1, 59, -1, 203, 180, 27, - 189, -1, 203, 220, -1, 203, 64, 63, 204, -1, - 203, 180, 181, 199, 196, 187, -1, 203, 180, 202, - 199, 191, 187, -1, 203, 180, 46, 199, 191, 187, - -1, 203, 180, 48, 199, 191, 187, -1, 203, 52, - 206, -1, 203, 60, 152, 207, -1, -1, 30, -1, - 57, -1, 56, -1, 54, 152, 205, -1, 55, 152, - 18, -1, 53, 152, 30, -1, 73, 152, 30, -1, - 157, 208, 159, -1, 208, 153, 30, -1, 30, -1, - -1, 28, -1, 30, -1, 209, -1, -1, 191, 210, - -1, 212, 153, 211, -1, 211, -1, 212, -1, 212, - 153, 41, -1, 41, -1, -1, 182, 189, 209, 155, - 213, 156, 186, 183, -1, 32, -1, 162, -1, 181, - 214, 215, -1, 35, 181, 214, 215, -1, 33, -1, - 163, -1, 216, 226, 217, -1, -1, 46, -1, 48, - -1, 34, 219, 214, -1, -1, 65, -1, 17, -1, - 18, -1, 21, -1, 25, -1, 26, -1, 22, -1, - 23, -1, 24, -1, 160, 198, 161, -1, 197, -1, - 63, 221, 30, 153, 30, -1, 167, -1, 209, -1, - 223, -1, 222, -1, 191, 224, -1, 226, 227, -1, - 227, -1, 228, 230, -1, 228, 232, -1, -1, 29, - -1, 79, -1, 78, -1, 74, 225, -1, 74, 3, - -1, 75, 15, 224, -1, 75, 4, 224, 153, 15, - 224, 153, 15, 224, -1, 76, 178, 224, 153, 15, - 224, 157, 231, 159, -1, 76, 178, 224, 153, 15, - 224, 157, 159, -1, 180, 77, 182, 189, 224, 155, - 235, 156, 40, 15, 224, 229, 15, 224, -1, 229, - -1, 80, -1, 231, 178, 222, 153, 15, 224, -1, - 178, 222, 153, 15, 224, -1, 180, 237, -1, 191, - 157, 224, 153, 224, 159, -1, 233, 153, 157, 224, - 153, 224, 159, -1, 225, -1, 234, 153, 225, -1, - 234, -1, -1, 62, 61, -1, 61, -1, 169, 191, - 224, 153, 224, -1, 170, 191, 224, 153, 224, -1, - 171, 191, 224, 153, 224, -1, 101, 172, 191, 224, - 153, 224, -1, 102, 173, 191, 224, 153, 224, -1, - 50, 225, -1, 174, 225, 153, 225, -1, 175, 225, - 40, 191, -1, 130, 225, 153, 225, 153, 225, -1, - 135, 225, 153, 191, -1, 136, 225, 153, 225, -1, - 137, 225, 153, 225, 153, 225, -1, 138, 225, 153, - 225, 153, 225, -1, 129, 233, -1, 236, 182, 189, - 224, 155, 235, 156, -1, 240, -1, 153, 234, -1, - -1, 39, -1, -1, 123, 191, 184, -1, 123, 191, - 153, 10, 224, 184, -1, 124, 191, 184, -1, 124, - 191, 153, 10, 224, 184, -1, 125, 225, -1, 239, - 126, 191, 224, -1, 239, 127, 225, 153, 191, 224, - -1, 128, 191, 224, 238, -1 + -1, 14, -1, 15, -1, 16, -1, 222, -1, 191, + -1, 153, 18, -1, 189, 154, 194, 155, -1, 156, + 18, 157, 192, 158, -1, 159, 18, 157, 192, 160, + -1, 161, 193, 162, -1, 161, 162, -1, 159, 161, + 193, 162, 160, -1, 159, 161, 162, 160, -1, 192, + 163, -1, 192, -1, 193, 152, 192, -1, 193, -1, + 193, 152, 40, -1, 40, -1, -1, 190, 156, 197, + 158, -1, 190, 156, 158, -1, 190, 164, 30, -1, + 190, 159, 197, 160, -1, 190, 161, 197, 162, -1, + 190, 161, 162, -1, 190, 22, -1, 190, 23, -1, + 190, 222, -1, 190, 196, -1, 190, 24, -1, 175, + 167, -1, 176, 18, -1, 4, 25, -1, 4, 26, + -1, 178, 21, -1, 174, 154, 195, 39, 190, 155, + -1, 127, 154, 195, 237, 155, -1, 129, 154, 195, + 152, 195, 152, 195, 155, -1, 168, 154, 195, 152, + 195, 155, -1, 169, 154, 195, 152, 195, 155, -1, + 170, 154, 195, 152, 195, 155, -1, 100, 171, 154, + 195, 152, 195, 155, -1, 101, 172, 154, 195, 152, + 195, 155, -1, 173, 154, 195, 152, 195, 155, -1, + 135, 154, 195, 152, 195, 155, -1, 136, 154, 195, + 152, 195, 152, 195, 155, -1, 137, 154, 195, 152, + 195, 152, 195, 155, -1, 197, 152, 195, -1, 195, + -1, 35, -1, 36, -1, 200, -1, 200, 217, -1, + 200, 219, -1, 200, 63, 62, 203, -1, 200, 31, + -1, 202, -1, 50, -1, 58, -1, 202, 179, 27, + 188, -1, 202, 219, -1, 202, 63, 62, 203, -1, + 202, 179, 180, 198, 195, 186, -1, 202, 179, 201, + 198, 190, 186, -1, 202, 179, 45, 198, 190, 186, + -1, 202, 179, 47, 198, 190, 186, -1, 202, 51, + 205, -1, 202, 59, 151, 206, -1, -1, 30, -1, + 56, -1, 55, -1, 53, 151, 204, -1, 54, 151, + 18, -1, 52, 151, 30, -1, 72, 151, 30, -1, + 156, 207, 158, -1, 207, 152, 30, -1, 30, -1, + -1, 28, -1, 30, -1, 208, -1, -1, 190, 209, + -1, 211, 152, 210, -1, 210, -1, 211, -1, 211, + 152, 40, -1, 40, -1, -1, 181, 188, 208, 154, + 212, 155, 185, 182, -1, 32, -1, 161, -1, 180, + 213, 214, -1, 33, -1, 162, -1, 215, 225, 216, + -1, -1, 45, -1, 47, -1, 34, 218, 213, -1, + -1, 64, -1, 17, -1, 18, -1, 21, -1, 25, + -1, 26, -1, 22, -1, 23, -1, 24, -1, 159, + 197, 160, -1, 196, -1, 62, 220, 30, 152, 30, + -1, 166, -1, 208, -1, 222, -1, 221, -1, 190, + 223, -1, 225, 226, -1, 226, -1, 227, 229, -1, + 227, 231, -1, -1, 29, -1, 78, -1, 77, -1, + 73, 224, -1, 73, 3, -1, 74, 15, 223, -1, + 74, 4, 223, 152, 15, 223, 152, 15, 223, -1, + 75, 177, 223, 152, 15, 223, 156, 230, 158, -1, + 75, 177, 223, 152, 15, 223, 156, 158, -1, 179, + 76, 181, 188, 223, 154, 234, 155, 39, 15, 223, + 228, 15, 223, -1, 228, -1, 79, -1, 230, 177, + 221, 152, 15, 223, -1, 177, 221, 152, 15, 223, + -1, 179, 236, -1, 190, 156, 223, 152, 223, 158, + -1, 232, 152, 156, 223, 152, 223, 158, -1, 224, + -1, 233, 152, 224, -1, 233, -1, -1, 61, 60, + -1, 60, -1, 168, 190, 223, 152, 223, -1, 169, + 190, 223, 152, 223, -1, 170, 190, 223, 152, 223, + -1, 100, 171, 190, 223, 152, 223, -1, 101, 172, + 190, 223, 152, 223, -1, 49, 224, -1, 173, 224, + 152, 224, -1, 174, 224, 39, 190, -1, 129, 224, + 152, 224, 152, 224, -1, 134, 224, 152, 190, -1, + 135, 224, 152, 224, -1, 136, 224, 152, 224, 152, + 224, -1, 137, 224, 152, 224, 152, 224, -1, 128, + 232, -1, 235, 181, 188, 223, 154, 234, 155, -1, + 239, -1, 152, 233, -1, -1, 38, -1, -1, 122, + 190, 183, -1, 122, 190, 152, 10, 223, 183, -1, + 123, 190, 183, -1, 123, 190, 152, 10, 223, 183, + -1, 124, 224, -1, 238, 125, 190, 223, -1, 238, + 126, 224, 152, 190, 223, -1, 127, 190, 223, 237, + -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 338, 338, 338, 339, 339, 343, 343, 343, 343, - 343, 343, 343, 344, 344, 344, 344, 345, 345, 345, - 346, 346, 346, 346, 346, 346, 347, 347, 347, 347, - 347, 347, 347, 347, 347, 347, 348, 348, 348, 348, - 348, 348, 348, 348, 348, 348, 349, 349, 349, 349, - 349, 349, 350, 350, 350, 350, 351, 351, 351, 351, - 351, 351, 351, 352, 352, 352, 352, 352, 352, 357, - 357, 357, 357, 358, 358, 358, 358, 359, 359, 360, - 360, 363, 366, 371, 371, 371, 371, 371, 371, 372, - 373, 376, 376, 376, 376, 376, 377, 378, 383, 388, - 389, 392, 393, 401, 407, 408, 411, 412, 421, 422, - 435, 435, 436, 436, 437, 441, 441, 441, 441, 441, - 441, 441, 442, 442, 442, 442, 442, 444, 448, 452, - 455, 460, 466, 474, 482, 488, 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, 687, 692, 697, - 705, 710, 715, 725, 730, 735, 735, 745, 750, 753, - 758, 762, 766, 768, 768, 771, 783, 788, 793, 802, - 811, 820, 829, 834, 839, 844, 846, 846, 849, 854, - 861, 866, 873, 880, 885, 886, 894, 894, 895, 895, - 897, 904, 908, 912, 915, 920, 923, 925, 945, 946, - 949, 958, 969, 970, 972, 980, 981, 982, 986, 999, - 1000, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1004, 1005, - 1010, 1011, 1020, 1020, 1024, 1030, 1041, 1047, 1050, 1058, - 1062, 1067, 1070, 1076, 1076, 1078, 1083, 1088, 1093, 1101, - 1108, 1114, 1134, 1139, 1145, 1150, 1158, 1167, 1174, 1182, - 1186, 1193, 1194, 1198, 1203, 1206, 1212, 1217, 1223, 1228, - 1233, 1238, 1246, 1260, 1265, 1270, 1275, 1280, 1285, 1290, - 1307, 1312, 1313, 1317, 1318, 1321, 1328, 1335, 1342, 1349, - 1354, 1361, 1368 + 0, 343, 343, 343, 344, 344, 348, 348, 348, 348, + 348, 348, 348, 349, 349, 349, 349, 350, 350, 350, + 351, 351, 351, 351, 351, 351, 352, 352, 352, 352, + 352, 352, 352, 352, 352, 352, 353, 353, 353, 353, + 353, 353, 353, 353, 353, 353, 354, 354, 354, 354, + 354, 354, 355, 355, 355, 355, 356, 356, 356, 356, + 356, 356, 356, 357, 357, 357, 357, 357, 357, 362, + 362, 362, 362, 363, 363, 363, 363, 364, 364, 365, + 365, 368, 371, 376, 376, 376, 376, 376, 376, 377, + 378, 381, 381, 381, 381, 381, 382, 383, 388, 393, + 394, 397, 398, 406, 412, 413, 416, 417, 426, 427, + 440, 440, 441, 441, 442, 446, 446, 446, 446, 446, + 446, 446, 447, 447, 447, 447, 447, 449, 453, 457, + 460, 465, 471, 479, 487, 493, 497, 503, 507, 518, + 521, 529, 530, 535, 538, 548, 554, 559, 565, 571, + 577, 582, 588, 594, 600, 606, 612, 618, 624, 630, + 636, 644, 658, 670, 675, 681, 686, 692, 697, 702, + 710, 715, 720, 730, 735, 740, 740, 750, 755, 758, + 763, 767, 771, 773, 773, 776, 788, 793, 798, 807, + 816, 825, 834, 839, 844, 849, 851, 851, 854, 859, + 866, 871, 878, 885, 890, 891, 899, 899, 900, 900, + 902, 909, 913, 917, 920, 925, 928, 931, 950, 951, + 954, 965, 966, 968, 976, 977, 978, 982, 995, 996, + 999, 999, 999, 999, 999, 999, 999, 1000, 1001, 1006, + 1007, 1016, 1016, 1020, 1026, 1037, 1043, 1046, 1054, 1058, + 1063, 1066, 1072, 1072, 1074, 1079, 1084, 1089, 1097, 1104, + 1110, 1130, 1135, 1141, 1146, 1154, 1163, 1170, 1178, 1182, + 1189, 1190, 1194, 1199, 1202, 1208, 1213, 1219, 1224, 1229, + 1234, 1242, 1256, 1261, 1266, 1271, 1276, 1281, 1286, 1303, + 1308, 1309, 1313, 1314, 1317, 1324, 1331, 1338, 1345, 1350, + 1357, 1364 }; #endif @@ -1070,12 +1073,12 @@ static const char *const yytname[] = "LABEL", "OPAQUE", "ESINT64VAL", "EUINT64VAL", "SINTVAL", "UINTVAL", "FPVAL", "NULL_TOK", "UNDEF", "ZEROINITIALIZER", "TRUETOK", "FALSETOK", "TYPE", "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION", - "BEGINTOK", "ENDTOK", "DECLARE", "DEFINE", "GLOBAL", "CONSTANT", - "SECTION", "VOLATILE", "TO", "DOTDOTDOT", "CONST", "INTERNAL", - "LINKONCE", "WEAK", "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "APPENDING", - "NOT", "EXTERNAL", "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", - "BIG", "ALIGN", "UNINITIALIZED", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", - "MODULE", "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK", + "BEGINTOK", "ENDTOK", "DECLARE", "GLOBAL", "CONSTANT", "SECTION", + "VOLATILE", "TO", "DOTDOTDOT", "CONST", "INTERNAL", "LINKONCE", "WEAK", + "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "APPENDING", "NOT", "EXTERNAL", + "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", "BIG", "ALIGN", + "UNINITIALIZED", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE", + "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK", "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT", "RET", "BR", "SWITCH", "INVOKE", "EXCEPT", "UNWIND", "UNREACHABLE", "ADD", "SUB", "MUL", "DIV", "UDIV", "SDIV", "FDIV", "REM", "UREM", @@ -1127,45 +1130,45 @@ static const unsigned short int yytoknum[] = 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 61, 44, 92, 40, 41, 91, 120, 93, - 60, 62, 123, 125, 42, 99 + 405, 61, 44, 92, 40, 41, 91, 120, 93, 60, + 62, 123, 125, 42, 99 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const unsigned char yyr1[] = { - 0, 166, 167, 167, 168, 168, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 170, 170, 170, + 0, 165, 166, 166, 167, 167, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 169, 169, 169, + 170, 170, 170, 170, 170, 170, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 174, 174, 174, 174, 175, 175, 175, 175, - 175, 175, 175, |