diff options
author | David Greene <greened@obbligato.org> | 2007-08-01 03:59:32 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2007-08-01 03:59:32 +0000 |
commit | 718fda37a70614c5158d0370da70c413fa0b6e0f (patch) | |
tree | a1c077e0c673f88f8f8403b34ba1adb5dfe100e4 /tools/llvm-upgrade/UpgradeParser.cpp.cvs | |
parent | 52eec548206d0b135b55ba52dd0e82e978f15ae5 (diff) |
Update generated files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40663 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-upgrade/UpgradeParser.cpp.cvs')
-rw-r--r-- | tools/llvm-upgrade/UpgradeParser.cpp.cvs | 2486 |
1 files changed, 1162 insertions, 1324 deletions
diff --git a/tools/llvm-upgrade/UpgradeParser.cpp.cvs b/tools/llvm-upgrade/UpgradeParser.cpp.cvs index 577d94daef..c7935bcc21 100644 --- a/tools/llvm-upgrade/UpgradeParser.cpp.cvs +++ b/tools/llvm-upgrade/UpgradeParser.cpp.cvs @@ -1,7 +1,7 @@ -/* A Bison parser, made by GNU Bison 2.1. */ +/* A Bison parser, made by GNU Bison 1.875c. */ /* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +15,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. @@ -36,9 +36,6 @@ /* Identify Bison output. */ #define YYBISON 1 -/* Bison version. */ -#define YYBISON_VERSION "2.1" - /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -48,7 +45,8 @@ /* Using locations. */ #define YYLSP_NEEDED 0 -/* Substitute the variable and function names. */ +/* If NAME_PREFIX is specified substitute the variables and functions + names. */ #define yyparse Upgradeparse #define yylex Upgradelex #define yyerror Upgradeerror @@ -215,7 +213,6 @@ BITCAST = 406 }; #endif -/* Tokens. */ #define ESINT64VAL 258 #define EUINT64VAL 259 #define SINTVAL 260 @@ -370,7 +367,7 @@ /* Copy the first part of user declarations. */ -#line 14 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" +#line 14 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" #include "UpgradeInternals.h" #include "llvm/CallingConv.h" @@ -1873,7 +1870,7 @@ upgradeIntrinsicCall(const Type* RetTy, const ValID &ID, const PointerType *PFTy = PointerType::get(FTy); Value* Func = getVal(PFTy, ID); Args[0] = new BitCastInst(Args[0], PtrTy, makeNameUnique("va"), CurBB); - return new CallInst(Func, &Args[0], Args.size()); + return new CallInst(Func, Args.begin(), Args.end()); } else if (Name == "llvm.va_copy") { if (Args.size() != 2) error("Invalid prototype for " + Name + " prototype"); @@ -1887,7 +1884,7 @@ upgradeIntrinsicCall(const Type* RetTy, const ValID &ID, std::string InstName1(makeNameUnique("va1")); Args[0] = new BitCastInst(Args[0], PtrTy, InstName0, CurBB); Args[1] = new BitCastInst(Args[1], PtrTy, InstName1, CurBB); - return new CallInst(Func, &Args[0], Args.size()); + return new CallInst(Func, Args.begin(), Args.end()); } } } @@ -2111,11 +2108,12 @@ Module* UpgradeAssembly(const std::string &infile, std::istream& in, while (!F->use_empty()) { CallInst* CI = cast<CallInst>(F->use_back()); - AllocaInst* a = new AllocaInst(ArgTy, 0, "vacopy.fix.1", CI); - AllocaInst* b = new AllocaInst(ArgTy, 0, "vacopy.fix.2", CI); - new StoreInst(CI->getOperand(1), b, CI); - new CallInst(NF, a, b, "", CI); - Value* foo = new LoadInst(a, "vacopy.fix.3", CI); + SmallVector<Value *, 2> Args; + Args.push_back(new AllocaInst(ArgTy, 0, "vacopy.fix.1", CI)); + Args.push_back(new AllocaInst(ArgTy, 0, "vacopy.fix.2", CI)); + new StoreInst(CI->getOperand(1), Args[1], CI); + new CallInst(NF, Args.begin(), Args.end(), "", CI); + Value* foo = new LoadInst(Args[0], "vacopy.fix.3", CI); CI->replaceAllUsesWith(foo); CI->getParent()->getInstList().erase(CI); } @@ -2145,13 +2143,8 @@ using namespace llvm; # define YYERROR_VERBOSE 0 #endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 1775 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" +#line 1776 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -2193,8 +2186,8 @@ typedef union YYSTYPE { llvm::FCmpInst::Predicate FPred; llvm::Module::Endianness Endianness; } YYSTYPE; -/* Line 196 of yacc.c. */ -#line 2198 "UpgradeParser.tab.c" +/* Line 191 of yacc.c. */ +#line 2191 "UpgradeParser.tab.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -2205,34 +2198,8 @@ typedef union YYSTYPE { /* Copy the second part of user declarations. */ -/* Line 219 of yacc.c. */ -#line 2210 "UpgradeParser.tab.c" - -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) -# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif - -#ifndef YY_ -# if YYENABLE_NLS -# if ENABLE_NLS -# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif +/* Line 214 of yacc.c. */ +#line 2203 "UpgradeParser.tab.c" #if ! defined (yyoverflow) || YYERROR_VERBOSE @@ -2240,14 +2207,14 @@ typedef union YYSTYPE { # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA +# define YYSTACK_ALLOC alloca +# endif +# else +# if defined (alloca) || defined (_ALLOCA_H) +# define YYSTACK_ALLOC alloca +# else # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca -# else -# define YYSTACK_ALLOC alloca -# if defined (__STDC__) || defined (__cplusplus) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# define YYINCLUDED_STDLIB_H -# endif # endif # endif # endif @@ -2255,39 +2222,13 @@ typedef union YYSTYPE { # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */ -# endif # else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) -# endif -# ifdef __cplusplus -extern "C" { -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \ - && (defined (__STDC__) || defined (__cplusplus))) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \ - && (defined (__STDC__) || defined (__cplusplus))) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifdef __cplusplus -} +# if defined (__STDC__) || defined (__cplusplus) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t # endif +# define YYSTACK_ALLOC malloc +# define YYSTACK_FREE free # endif #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ @@ -2299,7 +2240,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - short int yyss; + short yyss; YYSTYPE yyvs; }; @@ -2309,7 +2250,7 @@ union yyalloc /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do @@ -2322,7 +2263,7 @@ union yyalloc # define YYCOPY(To, From, Count) \ do \ { \ - YYSIZE_T yyi; \ + register YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ @@ -2351,7 +2292,7 @@ union yyalloc #if defined (__STDC__) || defined (__cplusplus) typedef signed char yysigned_char; #else - typedef short int yysigned_char; + typedef short yysigned_char; #endif /* YYFINAL -- State number of the termination state. */ @@ -2372,7 +2313,7 @@ union yyalloc #define YYUNDEFTOK 2 #define YYMAXUTOK 406 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ @@ -2424,7 +2365,7 @@ static const unsigned char yytranslate[] = #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const unsigned short int yyprhs[] = +static const unsigned short yyprhs[] = { 0, 0, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, @@ -2461,7 +2402,7 @@ static const unsigned short int yyprhs[] = }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const short int yyrhs[] = +static const short yyrhs[] = { 200, 0, -1, 5, -1, 6, -1, 3, -1, 4, -1, 79, -1, 80, -1, 81, -1, 82, -1, 83, @@ -2564,45 +2505,45 @@ static const short int yyrhs[] = }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short int yyrline[] = +static const unsigned short yyrline[] = { - 0, 1915, 1915, 1916, 1924, 1925, 1935, 1935, 1935, 1935, - 1935, 1935, 1935, 1935, 1935, 1935, 1935, 1939, 1939, 1939, - 1943, 1943, 1943, 1943, 1943, 1943, 1947, 1947, 1948, 1948, - 1949, 1949, 1950, 1950, 1951, 1951, 1955, 1955, 1956, 1956, - 1957, 1957, 1958, 1958, 1959, 1959, 1960, 1960, 1961, 1961, - 1962, 1963, 1966, 1966, 1966, 1966, 1970, 1970, 1970, 1970, - 1970, 1970, 1970, 1971, 1971, 1971, 1971, 1971, 1971, 1977, - 1977, 1977, 1977, 1981, 1981, 1981, 1981, 1985, 1985, 1989, - 1989, 1994, 1997, 2002, 2003, 2004, 2005, 2006, 2007, 2008, - 2009, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2030, - 2031, 2039, 2040, 2048, 2057, 2058, 2065, 2066, 2070, 2074, - 2090, 2091, 2098, 2099, 2106, 2114, 2114, 2114, 2114, 2114, - 2114, 2114, 2115, 2115, 2115, 2115, 2115, 2120, 2124, 2128, - 2133, 2142, 2169, 2175, 2188, 2199, 2203, 2216, 2220, 2234, - 2238, 2245, 2246, 2252, 2259, 2271, 2301, 2314, 2337, 2365, - 2387, 2398, 2420, 2431, 2440, 2445, 2504, 2511, 2519, 2526, - 2533, 2537, 2541, 2550, 2565, 2577, 2586, 2614, 2627, 2636, - 2642, 2648, 2659, 2665, 2671, 2682, 2683, 2692, 2693, 2705, - 2714, 2715, 2716, 2717, 2718, 2734, 2754, 2756, 2758, 2758, - 2765, 2765, 2773, 2773, 2781, 2781, 2790, 2792, 2794, 2799, - 2813, 2814, 2818, 2821, 2829, 2833, 2840, 2844, 2848, 2852, - 2860, 2860, 2864, 2865, 2869, 2877, 2882, 2890, 2891, 2898, - 2905, 2909, 3099, 3099, 3103, 3103, 3113, 3113, 3117, 3122, - 3123, 3124, 3128, 3129, 3128, 3141, 3142, 3147, 3148, 3149, - 3150, 3154, 3158, 3159, 3160, 3161, 3182, 3186, 3200, 3201, - 3206, 3206, 3214, 3224, 3227, 3236, 3247, 3252, 3261, 3272, - 3272, 3275, 3279, 3283, 3288, 3298, 3316, 3325, 3398, 3402, - 3409, 3421, 3436, 3466, 3476, 3486, 3490, 3497, 3498, 3502, - 3505, 3511, 3530, 3548, 3564, 3578, 3592, 3603, 3621, 3630, - 3639, 3646, 3667, 3691, 3697, 3703, 3709, 3725, 3818, 3826, - 3827, 3831, 3832, 3836, 3842, 3849, 3855, 3862, 3869, 3882, - 3908 + 0, 1916, 1916, 1917, 1925, 1926, 1936, 1936, 1936, 1936, + 1936, 1936, 1936, 1936, 1936, 1936, 1936, 1940, 1940, 1940, + 1944, 1944, 1944, 1944, 1944, 1944, 1948, 1948, 1949, 1949, + 1950, 1950, 1951, 1951, 1952, 1952, 1956, 1956, 1957, 1957, + 1958, 1958, 1959, 1959, 1960, 1960, 1961, 1961, 1962, 1962, + 1963, 1964, 1967, 1967, 1967, 1967, 1971, 1971, 1971, 1971, + 1971, 1971, 1971, 1972, 1972, 1972, 1972, 1972, 1972, 1978, + 1978, 1978, 1978, 1982, 1982, 1982, 1982, 1986, 1986, 1990, + 1990, 1995, 1998, 2003, 2004, 2005, 2006, 2007, 2008, 2009, + 2010, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2031, + 2032, 2040, 2041, 2049, 2058, 2059, 2066, 2067, 2071, 2075, + 2091, 2092, 2099, 2100, 2107, 2115, 2115, 2115, 2115, 2115, + 2115, 2115, 2116, 2116, 2116, 2116, 2116, 2121, 2125, 2129, + 2134, 2143, 2170, 2176, 2189, 2200, 2204, 2217, 2221, 2235, + 2239, 2246, 2247, 2253, 2260, 2272, 2302, 2315, 2338, 2366, + 2388, 2399, 2421, 2432, 2441, 2446, 2505, 2512, 2520, 2527, + 2534, 2538, 2542, 2551, 2566, 2578, 2587, 2615, 2628, 2637, + 2643, 2649, 2660, 2666, 2672, 2683, 2684, 2693, 2694, 2706, + 2715, 2716, 2717, 2718, 2719, 2735, 2755, 2757, 2759, 2759, + 2766, 2766, 2774, 2774, 2782, 2782, 2791, 2793, 2795, 2800, + 2814, 2815, 2819, 2822, 2830, 2834, 2841, 2845, 2849, 2853, + 2861, 2861, 2865, 2866, 2870, 2878, 2883, 2891, 2892, 2899, + 2906, 2910, 3100, 3100, 3104, 3104, 3114, 3114, 3118, 3123, + 3124, 3125, 3129, 3130, 3129, 3142, 3143, 3148, 3149, 3150, + 3151, 3155, 3159, 3160, 3161, 3162, 3183, 3187, 3201, 3202, + 3207, 3207, 3215, 3225, 3228, 3237, 3248, 3253, 3262, 3273, + 3273, 3276, 3280, 3284, 3289, 3299, 3317, 3326, 3399, 3403, + 3410, 3422, 3437, 3467, 3477, 3487, 3491, 3498, 3499, 3503, + 3506, 3512, 3531, 3549, 3565, 3579, 3593, 3604, 3622, 3631, + 3640, 3647, 3668, 3692, 3698, 3704, 3710, 3726, 3819, 3827, + 3828, 3832, 3833, 3837, 3843, 3850, 3856, 3863, 3870, 3883, + 3909 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. +#if YYDEBUG || YYERROR_VERBOSE +/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { @@ -2652,7 +2593,7 @@ static const char *const yytname[] = # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ -static const unsigned short int yytoknum[] = +static const unsigned short yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, @@ -2751,7 +2692,7 @@ static const unsigned char yyr2[] = /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ -static const unsigned short int yydefact[] = +static const unsigned short yydefact[] = { 198, 0, 90, 184, 1, 183, 232, 83, 84, 85, 86, 87, 88, 89, 0, 224, 257, 180, 181, 257, @@ -2817,7 +2758,7 @@ static const unsigned short int yydefact[] = }; /* YYDEFGOTO[NTERM-NUM]. */ -static const short int yydefgoto[] = +static const short yydefgoto[] = { -1, 94, 312, 329, 330, 331, 255, 272, 332, 333, 219, 220, 243, 221, 25, 15, 63, 555, 359, 454, @@ -2833,7 +2774,7 @@ static const short int yydefgoto[] = /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -542 -static const short int yypact[] = +static const short yypact[] = { -542, 13, 162, 567, -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, 83, -542, 19, -542, -542, -14, @@ -2899,7 +2840,7 @@ static const short int yypact[] = }; /* YYPGOTO[NTERM-NUM]. */ -static const short int yypgoto[] = +static const short yypgoto[] = { -542, -542, -542, 435, 439, 441, 191, 197, 442, 445, -119, -116, -541, -542, 478, 489, -107, -542, -267, 37, @@ -2917,7 +2858,7 @@ static const short int yypgoto[] = number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -180 -static const short int yytable[] = +static const short yytable[] = { 97, 241, 227, 110, 242, 230, 223, 361, 197, 31, 111, 26, 449, 4, 244, 204, 34, 578, 97, 201, @@ -3085,7 +3026,7 @@ static const short int yytable[] = 175 }; -static const short int yycheck[] = +static const short yycheck[] = { 45, 120, 115, 63, 120, 118, 107, 274, 4, 23, 29, 3, 161, 0, 121, 164, 30, 558, 63, 93, @@ -3320,6 +3261,22 @@ static const unsigned char yystos[] = 235, 230, 21, 21, 230, 230 }; +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) +# define YYSIZE_T __SIZE_TYPE__ +#endif +#if ! defined (YYSIZE_T) && defined (size_t) +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) +# if defined (__STDC__) || defined (__cplusplus) +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +#endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int +#endif + #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) @@ -3349,59 +3306,26 @@ do \ goto yybackup; \ } \ else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ + { \ + yyerror ("syntax error: cannot back up");\ YYERROR; \ } \ while (0) - #define YYTERROR 1 #define YYERRCODE 256 +/* YYLLOC_DEFAULT -- Compute the default location (before the actions + are run). */ -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (0) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + ((Current).first_line = (Rhs)[1].first_line, \ + (Current).first_column = (Rhs)[1].first_column, \ + (Current).last_line = (Rhs)[N].last_line, \ + (Current).last_column = (Rhs)[N].last_column) #endif - /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM @@ -3424,13 +3348,19 @@ do { \ YYFPRINTF Args; \ } while (0) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +# define YYDSYMPRINT(Args) \ +do { \ + if (yydebug) \ + yysymprint Args; \ +} while (0) + +# define YYDSYMPRINTF(Title, Token, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Type, Value); \ + yysymprint (stderr, \ + Token, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) @@ -3442,12 +3372,12 @@ do { \ #if defined (__STDC__) || defined (__cplusplus) static void -yy_stack_print (short int *bottom, short int *top) +yy_stack_print (short *bottom, short *top) #else static void yy_stack_print (bottom, top) - short int *bottom; - short int *top; + short *bottom; + short *top; #endif { YYFPRINTF (stderr, "Stack now"); @@ -3477,13 +3407,13 @@ yy_reduce_print (yyrule) #endif { int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", + unsigned int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", yyrule - 1, yylno); /* Print the symbols being reduced, and their result. */ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]); + YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); + YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); } # define YY_REDUCE_PRINT(Rule) \ @@ -3497,7 +3427,8 @@ do { \ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YYDSYMPRINT(Args) +# define YYDSYMPRINTF(Title, Token, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -3512,9 +3443,13 @@ int yydebug; if the built-in stack extension method is used). Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ +#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 +# undef YYMAXDEPTH +#endif + #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif @@ -3536,7 +3471,7 @@ yystrlen (yystr) const char *yystr; # endif { - const char *yys = yystr; + register const char *yys = yystr; while (*yys++ != '\0') continue; @@ -3561,8 +3496,8 @@ yystpcpy (yydest, yysrc) const char *yysrc; # endif { - char *yyd = yydest; - const char *yys = yysrc; + register char *yyd = yydest; + register const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; @@ -3572,55 +3507,7 @@ yystpcpy (yydest, yysrc) # endif # endif -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - size_t yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -#endif /* YYERROR_VERBOSE */ +#endif /* !YYERROR_VERBOSE */ @@ -3644,15 +3531,15 @@ yysymprint (yyoutput, yytype, yyvaluep) (void) yyvaluep; if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + { + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); +# ifdef YYPRINT + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + } else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif switch (yytype) { default: @@ -3668,11 +3555,10 @@ yysymprint (yyoutput, yytype, yyvaluep) #if defined (__STDC__) || defined (__cplusplus) static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +yydestruct (int yytype, YYSTYPE *yyvaluep) #else static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; +yydestruct (yytype, yyvaluep) int yytype; YYSTYPE *yyvaluep; #endif @@ -3680,10 +3566,6 @@ yydestruct (yymsg, yytype, yyvaluep) /* Pacify ``unused variable'' warnings. */ (void) yyvaluep; - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) { @@ -3711,10 +3593,10 @@ int yyparse (); -/* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ +/* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ @@ -3745,12 +3627,12 @@ yyparse () #endif { - int yystate; - int yyn; + register int yystate; + register int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ + /* Lookahead token as an internal (translated) token number. */ int yytoken = 0; /* Three stacks and their tools: @@ -3762,14 +3644,14 @@ yyparse () to reallocate them elsewhere. */ /* The state stack. */ - short int yyssa[YYINITDEPTH]; - short int *yyss = yyssa; - short int *yyssp; + short yyssa[YYINITDEPTH]; + short *yyss = yyssa; + register short *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + register YYSTYPE *yyvsp; @@ -3826,14 +3708,14 @@ yyparse () these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; - short int *yyss1 = yyss; + short *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), + yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), @@ -3844,21 +3726,21 @@ yyparse () } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; + goto yyoverflowlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyoverflowlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { - short int *yyss1 = yyss; + short *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) - goto yyexhaustedlab; + goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); @@ -3890,18 +3772,18 @@ yyparse () yybackup: /* Do appropriate processing given the current state. */ -/* Read a look-ahead token if we need one and don't already have one. */ +/* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -3916,7 +3798,7 @@ yybackup: else { yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to @@ -3936,8 +3818,8 @@ yybackup: if (yyn == YYFINAL) YYACCEPT; - /* Shift the look-ahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + /* Shift the lookahead token. */ + YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) @@ -3987,399 +3869,399 @@ yyreduce: switch (yyn) { case 3: -#line 1916 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" +#line 1917 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" { - if ((yyvsp[0].UIntVal) > (uint32_t)INT32_MAX) // Outside of my range! + if (yyvsp[0].UIntVal > (uint32_t)INT32_MAX) // Outside of my range! error("Value too large for type"); - (yyval.SIntVal) = (int32_t)(yyvsp[0].UIntVal); + yyval.SIntVal = (int32_t)yyvsp[0].UIntVal; ;} break; case 5: -#line 1925 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" +#line 1926 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" { - if ((yyvsp[0].UInt64Val) > (uint64_t)INT64_MAX) // Outside of my range! + if (yyvsp[0].UInt64Val > (uint64_t)INT64_MAX) // Outside of my range! error("Value too large for type"); - (yyval.SInt64Val) = (int64_t)(yyvsp[0].UInt64Val); + yyval.SInt64Val = (int64_t)yyvsp[0].UInt64Val; ;} break; case 26: -#line 1947 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_EQ; ;} +#line 1948 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" + { yyval.IPred = ICmpInst::ICMP_EQ; ;} break; case 27: -#line 1947 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_NE; ;} +#line 1948 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" + { yyval.IPred = ICmpInst::ICMP_NE; ;} break; case 28: -#line 1948 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_SLT; ;} +#line 1949 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" + { yyval.IPred = ICmpInst::ICMP_SLT; ;} break; case 29: -#line 1948 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_SGT; ;} +#line 1949 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" + { yyval.IPred = ICmpInst::ICMP_SGT; ;} break; case 30: -#line 1949 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_SLE; ;} +#line 1950 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" + { yyval.IPred = ICmpInst::ICMP_SLE; ;} break; case 31: -#line 1949 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_SGE; ;} +#line 1950 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" + { yyval.IPred = ICmpInst::ICMP_SGE; ;} break; case 32: -#line 1950 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_ULT; ;} +#line 1951 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" + { yyval.IPred = ICmpInst::ICMP_ULT; ;} break; case 33: -#line 1950 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_UGT; ;} +#line 1951 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" + { yyval.IPred = ICmpInst::ICMP_UGT; ;} break; case 34: -#line 1951 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_ULE; ;} +#line 1952 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" + { yyval.IPred = ICmpInst::ICMP_ULE; ;} break; case 35: -#line 1951 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_UGE; ;} +#line 1952 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" + { yyval.IPred = ICmpInst::ICMP_UGE; ;} break; case 36: -#line 1955 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_OEQ; ;} +#line 1956 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" + { yyval.FPred = FCmpInst::FCMP_OEQ; ;} break; case 37: -#line 1955 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_ONE; ;} +#line 1956 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" + { yyval.FPred = FCmpInst::FCMP_ONE; ;} break; case 38: -#line 1956 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_OLT; ;} +#line 1957 "/users/dag/projects/cascade/llvm.modified/tools/llvm-upgrade/UpgradeParser.y" + { yyval.FPred = FCmpInst::FCMP_OLT; ;} break; case 39: -#line 1956 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" - { (yyv |