diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-04-11 12:10:58 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-04-11 12:10:58 +0000 |
commit | baba98ae88a93a8799c51387c47f88a0daa34019 (patch) | |
tree | c61d80f13e5f1094f3493fde8890dbbf902e6023 /tools/llvm-upgrade | |
parent | 84867442146b6a860ba01e65b3b225cba56cb283 (diff) | |
download | external_llvm-baba98ae88a93a8799c51387c47f88a0daa34019.zip external_llvm-baba98ae88a93a8799c51387c47f88a0daa34019.tar.gz external_llvm-baba98ae88a93a8799c51387c47f88a0daa34019.tar.bz2 |
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-upgrade')
-rw-r--r-- | tools/llvm-upgrade/UpgradeParser.cpp.cvs | 539 | ||||
-rw-r--r-- | tools/llvm-upgrade/UpgradeParser.h.cvs | 2 | ||||
-rw-r--r-- | tools/llvm-upgrade/UpgradeParser.y.cvs | 3 |
3 files changed, 273 insertions, 271 deletions
diff --git a/tools/llvm-upgrade/UpgradeParser.cpp.cvs b/tools/llvm-upgrade/UpgradeParser.cpp.cvs index ae4bd09..ebcabec 100644 --- a/tools/llvm-upgrade/UpgradeParser.cpp.cvs +++ b/tools/llvm-upgrade/UpgradeParser.cpp.cvs @@ -370,7 +370,7 @@ /* Copy the first part of user declarations. */ -#line 14 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 14 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" #include "UpgradeInternals.h" #include "llvm/CallingConv.h" @@ -1134,7 +1134,8 @@ static void ResolveTypeTo(char *Name, const Type *ToTy, const Signedness& Sign){ D = ValID::create((int)CurModule.Types.size()); D.S.copy(Sign); - CurModule.NamedTypeSigns[Name] = Sign; + if (Name) + CurModule.NamedTypeSigns[Name] = Sign; std::map<ValID, PATypeHolder>::iterator I = CurModule.LateResolveTypes.find(D); @@ -2117,7 +2118,7 @@ using namespace llvm; #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 1741 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1742 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -2160,7 +2161,7 @@ typedef union YYSTYPE { llvm::Module::Endianness Endianness; } YYSTYPE; /* Line 196 of yacc.c. */ -#line 2164 "UpgradeParser.tab.c" +#line 2165 "UpgradeParser.tab.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -2172,7 +2173,7 @@ typedef union YYSTYPE { /* Line 219 of yacc.c. */ -#line 2176 "UpgradeParser.tab.c" +#line 2177 "UpgradeParser.tab.c" #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ @@ -2532,38 +2533,38 @@ static const short int yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 1881, 1881, 1882, 1890, 1891, 1901, 1901, 1901, 1901, - 1901, 1901, 1901, 1901, 1901, 1901, 1901, 1905, 1905, 1905, - 1909, 1909, 1909, 1909, 1909, 1909, 1913, 1913, 1914, 1914, - 1915, 1915, 1916, 1916, 1917, 1917, 1921, 1921, 1922, 1922, - 1923, 1923, 1924, 1924, 1925, 1925, 1926, 1926, 1927, 1927, - 1928, 1929, 1932, 1932, 1932, 1932, 1936, 1936, 1936, 1936, - 1936, 1936, 1936, 1937, 1937, 1937, 1937, 1937, 1937, 1943, - 1943, 1943, 1943, 1947, 1947, 1947, 1947, 1951, 1951, 1955, - 1955, 1960, 1963, 1968, 1969, 1970, 1971, 1972, 1973, 1974, - 1975, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1996, - 1997, 2005, 2006, 2014, 2023, 2024, 2031, 2032, 2036, 2040, - 2056, 2057, 2064, 2065, 2072, 2080, 2080, 2080, 2080, 2080, - 2080, 2080, 2081, 2081, 2081, 2081, 2081, 2086, 2090, 2094, - 2099, 2108, 2126, 2132, 2145, 2156, 2160, 2173, 2177, 2191, - 2195, 2202, 2203, 2209, 2216, 2228, 2258, 2271, 2294, 2322, - 2344, 2355, 2377, 2388, 2397, 2402, 2461, 2468, 2476, 2483, - 2490, 2494, 2498, 2507, 2522, 2535, 2544, 2572, 2585, 2594, - 2600, 2606, 2617, 2623, 2629, 2640, 2641, 2650, 2651, 2663, - 2672, 2673, 2674, 2675, 2676, 2692, 2712, 2714, 2716, 2716, - 2723, 2723, 2731, 2731, 2739, 2739, 2748, 2750, 2752, 2757, - 2771, 2772, 2776, 2779, 2787, 2791, 2798, 2802, 2806, 2810, - 2818, 2818, 2822, 2823, 2827, 2835, 2840, 2848, 2849, 2856, - 2863, 2867, 3049, 3049, 3053, 3053, 3063, 3063, 3067, 3072, - 3073, 3074, 3078, 3079, 3078, 3091, 3092, 3097, 3098, 3099, - 3100, 3104, 3108, 3109, 3110, 3111, 3132, 3136, 3150, 3151, - 3156, 3156, 3164, 3174, 3177, 3186, 3197, 3202, 3211, 3222, - 3222, 3225, 3229, 3233, 3238, 3248, 3266, 3275, 3345, 3349, - 3356, 3368, 3383, 3413, 3423, 3433, 3437, 3444, 3445, 3449, - 3452, 3458, 3477, 3495, 3511, 3525, 3539, 3550, 3568, 3577, - 3586, 3593, 3614, 3638, 3644, 3650, 3656, 3672, 3762, 3770, - 3771, 3775, 3776, 3780, 3786, 3793, 3799, 3806, 3813, 3826, - 3852 + 0, 1882, 1882, 1883, 1891, 1892, 1902, 1902, 1902, 1902, + 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1906, 1906, 1906, + 1910, 1910, 1910, 1910, 1910, 1910, 1914, 1914, 1915, 1915, + 1916, 1916, 1917, 1917, 1918, 1918, 1922, 1922, 1923, 1923, + 1924, 1924, 1925, 1925, 1926, 1926, 1927, 1927, 1928, 1928, + 1929, 1930, 1933, 1933, 1933, 1933, 1937, 1937, 1937, 1937, + 1937, 1937, 1937, 1938, 1938, 1938, 1938, 1938, 1938, 1944, + 1944, 1944, 1944, 1948, 1948, 1948, 1948, 1952, 1952, 1956, + 1956, 1961, 1964, 1969, 1970, 1971, 1972, 1973, 1974, 1975, + 1976, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1997, + 1998, 2006, 2007, 2015, 2024, 2025, 2032, 2033, 2037, 2041, + 2057, 2058, 2065, 2066, 2073, 2081, 2081, 2081, 2081, 2081, + 2081, 2081, 2082, 2082, 2082, 2082, 2082, 2087, 2091, 2095, + 2100, 2109, 2127, 2133, 2146, 2157, 2161, 2174, 2178, 2192, + 2196, 2203, 2204, 2210, 2217, 2229, 2259, 2272, 2295, 2323, + 2345, 2356, 2378, 2389, 2398, 2403, 2462, 2469, 2477, 2484, + 2491, 2495, 2499, 2508, 2523, 2536, 2545, 2573, 2586, 2595, + 2601, 2607, 2618, 2624, 2630, 2641, 2642, 2651, 2652, 2664, + 2673, 2674, 2675, 2676, 2677, 2693, 2713, 2715, 2717, 2717, + 2724, 2724, 2732, 2732, 2740, 2740, 2749, 2751, 2753, 2758, + 2772, 2773, 2777, 2780, 2788, 2792, 2799, 2803, 2807, 2811, + 2819, 2819, 2823, 2824, 2828, 2836, 2841, 2849, 2850, 2857, + 2864, 2868, 3050, 3050, 3054, 3054, 3064, 3064, 3068, 3073, + 3074, 3075, 3079, 3080, 3079, 3092, 3093, 3098, 3099, 3100, + 3101, 3105, 3109, 3110, 3111, 3112, 3133, 3137, 3151, 3152, + 3157, 3157, 3165, 3175, 3178, 3187, 3198, 3203, 3212, 3223, + 3223, 3226, 3230, 3234, 3239, 3249, 3267, 3276, 3346, 3350, + 3357, 3369, 3384, 3414, 3424, 3434, 3438, 3445, 3446, 3450, + 3453, 3459, 3478, 3496, 3512, 3526, 3540, 3551, 3569, 3578, + 3587, 3594, 3615, 3639, 3645, 3651, 3657, 3673, 3763, 3771, + 3772, 3776, 3777, 3781, 3787, 3794, 3800, 3807, 3814, 3827, + 3853 }; #endif @@ -3953,7 +3954,7 @@ yyreduce: switch (yyn) { case 3: -#line 1882 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1883 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].UIntVal) > (uint32_t)INT32_MAX) // Outside of my range! error("Value too large for type"); @@ -3962,7 +3963,7 @@ yyreduce: break; case 5: -#line 1891 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1892 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].UInt64Val) > (uint64_t)INT64_MAX) // Outside of my range! error("Value too large for type"); @@ -3971,226 +3972,226 @@ yyreduce: break; case 26: -#line 1913 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1914 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_EQ; ;} break; case 27: -#line 1913 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1914 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_NE; ;} break; case 28: -#line 1914 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1915 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_SLT; ;} break; case 29: -#line 1914 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1915 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_SGT; ;} break; case 30: -#line 1915 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1916 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_SLE; ;} break; case 31: -#line 1915 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1916 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_SGE; ;} break; case 32: -#line 1916 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1917 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_ULT; ;} break; case 33: -#line 1916 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1917 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_UGT; ;} break; case 34: -#line 1917 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1918 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_ULE; ;} break; case 35: -#line 1917 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1918 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_UGE; ;} break; case 36: -#line 1921 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1922 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_OEQ; ;} break; case 37: -#line 1921 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1922 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_ONE; ;} break; case 38: -#line 1922 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1923 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_OLT; ;} break; case 39: -#line 1922 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1923 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_OGT; ;} break; case 40: -#line 1923 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1924 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_OLE; ;} break; case 41: -#line 1923 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1924 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_OGE; ;} break; case 42: -#line 1924 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1925 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_ORD; ;} break; case 43: -#line 1924 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1925 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_UNO; ;} break; case 44: -#line 1925 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1926 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_UEQ; ;} break; case 45: -#line 1925 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1926 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_UNE; ;} break; case 46: -#line 1926 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1927 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_ULT; ;} break; case 47: -#line 1926 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1927 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_UGT; ;} break; case 48: -#line 1927 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1928 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_ULE; ;} break; case 49: -#line 1927 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1928 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_UGE; ;} break; case 50: -#line 1928 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1929 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_TRUE; ;} break; case 51: -#line 1929 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1930 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_FALSE; ;} break; case 81: -#line 1960 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1961 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.StrVal) = (yyvsp[-1].StrVal); ;} break; case 82: -#line 1963 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1964 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.StrVal) = 0; ;} break; case 83: -#line 1968 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1969 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 84: -#line 1969 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1970 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 85: -#line 1970 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1971 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 86: -#line 1971 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1972 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} break; case 87: -#line 1972 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1973 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 88: -#line 1973 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1974 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 89: -#line 1974 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1975 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 90: -#line 1975 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1976 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 91: -#line 1979 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1980 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::C; ;} break; case 92: -#line 1980 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1981 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::C; ;} break; case 93: -#line 1981 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1982 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::CSRet; ;} break; case 94: -#line 1982 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1983 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::Fast; ;} break; case 95: -#line 1983 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1984 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::Cold; ;} break; case 96: -#line 1984 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1985 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::X86_StdCall; ;} break; case 97: -#line 1985 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1986 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::X86_FastCall; ;} break; case 98: -#line 1986 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1987 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if ((unsigned)(yyvsp[0].UInt64Val) != (yyvsp[0].UInt64Val)) error("Calling conv too large"); @@ -4199,12 +4200,12 @@ yyreduce: break; case 99: -#line 1996 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1997 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = 0; ;} break; case 100: -#line 1997 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1998 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = (yyvsp[0].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -4213,12 +4214,12 @@ yyreduce: break; case 101: -#line 2005 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2006 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = 0; ;} break; case 102: -#line 2006 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2007 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = (yyvsp[0].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -4227,7 +4228,7 @@ yyreduce: break; case 103: -#line 2014 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2015 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { for (unsigned i = 0, e = strlen((yyvsp[0].StrVal)); i != e; ++i) if ((yyvsp[0].StrVal)[i] == '"' || (yyvsp[0].StrVal)[i] == '\\') @@ -4237,27 +4238,27 @@ yyreduce: break; case 104: -#line 2023 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2024 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.StrVal) = 0; ;} break; case 105: -#line 2024 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2025 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.StrVal) = (yyvsp[0].StrVal); ;} break; case 106: -#line 2031 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2032 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" {;} break; case 107: -#line 2032 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2033 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" {;} break; case 108: -#line 2036 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2037 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { CurGV->setSection((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4265,7 +4266,7 @@ yyreduce: break; case 109: -#line 2040 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2041 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[0].UInt64Val))) error("Alignment must be a power of two"); @@ -4275,7 +4276,7 @@ yyreduce: break; case 111: -#line 2057 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2058 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[0].PrimType).T); (yyval.TypeVal).S.makeSignless(); @@ -4283,7 +4284,7 @@ yyreduce: break; case 113: -#line 2065 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2066 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[0].PrimType).T); (yyval.TypeVal).S.makeSignless(); @@ -4291,7 +4292,7 @@ yyreduce: break; case 114: -#line 2072 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2073 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if (!UpRefs.empty()) error("Invalid upreference in type: " + (*(yyvsp[0].TypeVal).PAT)->getDescription()); @@ -4300,7 +4301,7 @@ yyreduce: break; case 127: -#line 2086 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2087 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[0].PrimType).T); (yyval.TypeVal).S.copy((yyvsp[0].PrimType).S); @@ -4308,7 +4309,7 @@ yyreduce: break; case 128: -#line 2090 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2091 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeVal).PAT = new PATypeHolder(OpaqueType::get()); (yyval.TypeVal).S.makeSignless(); @@ -4316,7 +4317,7 @@ yyreduce: break; case 129: -#line 2094 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2095 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Named types are also simple types... (yyval.TypeVal).S.copy(getTypeSign((yyvsp[0].ValIDVal))); const Type* tmp = getType((yyvsp[0].ValIDVal)); @@ -4325,7 +4326,7 @@ yyreduce: break; case 130: -#line 2099 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2100 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Type UpReference if ((yyvsp[0].UInt64Val) > (uint64_t)~0U) error("Value out of range"); @@ -4338,7 +4339,7 @@ yyreduce: break; case 131: -#line 2108 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2109 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Function derived type? (yyval.TypeVal).S.makeComposite((yyvsp[-3].TypeVal).S); std::vector<const Type*> Params; @@ -4360,7 +4361,7 @@ yyreduce: break; case 132: -#line 2126 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2127 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Sized array type? (yyval.TypeVal).S.makeComposite((yyvsp[-1].TypeVal).S); (yyval.TypeVal).PAT = new PATypeHolder(HandleUpRefs(ArrayType::get((yyvsp[-1].TypeVal).PAT->get(), @@ -4370,7 +4371,7 @@ yyreduce: break; case 133: -#line 2132 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2133 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Vector type? const llvm::Type* ElemTy = (yyvsp[-1].TypeVal).PAT->get(); if ((unsigned)(yyvsp[-3].UInt64Val) != (yyvsp[-3].UInt64Val)) @@ -4387,7 +4388,7 @@ yyreduce: break; case 134: -#line 2145 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2146 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Structure type? std::vector<const Type*> Elements; (yyval.TypeVal).S.makeComposite(); @@ -4402,7 +4403,7 @@ yyreduce: break; case 135: -#line 2156 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2157 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Empty structure type? (yyval.TypeVal).PAT = new PATypeHolder(StructType::get(std::vector<const Type*>())); (yyval.TypeVal).S.makeComposite(); @@ -4410,7 +4411,7 @@ yyreduce: break; case 136: -#line 2160 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2161 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Packed Structure type? (yyval.TypeVal).S.makeComposite(); std::vector<const Type*> Elements; @@ -4427,7 +4428,7 @@ yyreduce: break; case 137: -#line 2173 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2174 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Empty packed structure type? (yyval.TypeVal).PAT = new PATypeHolder(StructType::get(std::vector<const Type*>(),true)); (yyval.TypeVal).S.makeComposite(); @@ -4435,7 +4436,7 @@ yyreduce: break; case 138: -#line 2177 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2178 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Pointer type? if ((yyvsp[-1].TypeVal).PAT->get() == Type::LabelTy) error("Cannot form a pointer to a basic block"); @@ -4447,7 +4448,7 @@ yyreduce: break; case 139: -#line 2191 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2192 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeList) = new std::list<PATypeInfo>(); (yyval.TypeList)->push_back((yyvsp[0].TypeVal)); @@ -4455,14 +4456,14 @@ yyreduce: break; case 140: -#line 2195 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2196 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back((yyvsp[0].TypeVal)); ;} break; case 142: -#line 2203 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2204 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { PATypeInfo VoidTI; VoidTI.PAT = new PATypeHolder(Type::VoidTy); @@ -4472,7 +4473,7 @@ yyreduce: break; case 143: -#line 2209 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2210 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeList) = new std::list<PATypeInfo>(); PATypeInfo VoidTI; @@ -4483,14 +4484,14 @@ yyreduce: break; case 144: -#line 2216 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2217 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeList) = new std::list<PATypeInfo>(); ;} break; case 145: -#line 2228 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2229 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Nonempty unsized arr const ArrayType *ATy = dyn_cast<ArrayType>((yyvsp[-3].TypeVal).PAT->get()); if (ATy == 0) @@ -4524,7 +4525,7 @@ yyreduce: break; case 146: -#line 2258 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2259 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const ArrayType *ATy = dyn_cast<ArrayType>((yyvsp[-2].TypeVal).PAT->get()); if (ATy == 0) @@ -4541,7 +4542,7 @@ yyreduce: break; case 147: -#line 2271 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2272 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const ArrayType *ATy = dyn_cast<ArrayType>((yyvsp[-2].TypeVal).PAT->get()); if (ATy == 0) @@ -4568,7 +4569,7 @@ yyreduce: break; case 148: -#line 2294 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2295 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Nonempty unsized arr const VectorType *PTy = dyn_cast<VectorType>((yyvsp[-3].TypeVal).PAT->get()); if (PTy == 0) @@ -4600,7 +4601,7 @@ yyreduce: break; case 149: -#line 2322 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2323 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const StructType *STy = dyn_cast<StructType>((yyvsp[-3].TypeVal).PAT->get()); if (STy == 0) @@ -4626,7 +4627,7 @@ yyreduce: break; case 150: -#line 2344 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2345 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const StructType *STy = dyn_cast<StructType>((yyvsp[-2].TypeVal).PAT->get()); if (STy == 0) @@ -4641,7 +4642,7 @@ yyreduce: break; case 151: -#line 2355 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2356 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const StructType *STy = dyn_cast<StructType>((yyvsp[-5].TypeVal).PAT->get()); if (STy == 0) @@ -4667,7 +4668,7 @@ yyreduce: break; case 152: -#line 2377 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2378 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const StructType *STy = dyn_cast<StructType>((yyvsp[-4].TypeVal).PAT->get()); if (STy == 0) @@ -4682,7 +4683,7 @@ yyreduce: break; case 153: -#line 2388 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2389 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const PointerType *PTy = dyn_cast<PointerType>((yyvsp[-1].TypeVal).PAT->get()); if (PTy == 0) @@ -4695,7 +4696,7 @@ yyreduce: break; case 154: -#line 2397 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2398 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ConstVal).C = UndefValue::get((yyvsp[-1].TypeVal).PAT->get()); (yyval.ConstVal).S.copy((yyvsp[-1].TypeVal).S); @@ -4704,7 +4705,7 @@ yyreduce: break; case 155: -#line 2402 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2403 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const PointerType *Ty = dyn_cast<PointerType>((yyvsp[-1].TypeVal).PAT->get()); if (Ty == 0) @@ -4767,7 +4768,7 @@ yyreduce: break; case 156: -#line 2461 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2462 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[-1].TypeVal).PAT->get() != (yyvsp[0].ConstVal).C->getType()) error("Mismatched types for constant expression"); @@ -4778,7 +4779,7 @@ yyreduce: break; case 157: -#line 2468 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2469 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-1].TypeVal).PAT->get(); if (isa<FunctionType>(Ty) || Ty == Type::LabelTy || isa<OpaqueType>(Ty)) @@ -4790,7 +4791,7 @@ yyreduce: break; case 158: -#line 2476 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2477 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // integral constants const Type *Ty = (yyvsp[-1].PrimType).T; if (!ConstantInt::isValueValidForType(Ty, (yyvsp[0].SInt64Val))) @@ -4801,7 +4802,7 @@ yyreduce: break; case 159: -#line 2483 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2484 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // integral constants const Type *Ty = (yyvsp[-1].PrimType).T; if (!ConstantInt::isValueValidForType(Ty, (yyvsp[0].UInt64Val))) @@ -4812,7 +4813,7 @@ yyreduce: break; case 160: -#line 2490 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2491 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Boolean constants (yyval.ConstVal).C = ConstantInt::get(Type::Int1Ty, true); (yyval.ConstVal).S.makeUnsigned(); @@ -4820,7 +4821,7 @@ yyreduce: break; case 161: -#line 2494 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2495 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Boolean constants (yyval.ConstVal).C = ConstantInt::get(Type::Int1Ty, false); (yyval.ConstVal).S.makeUnsigned(); @@ -4828,7 +4829,7 @@ yyreduce: break; case 162: -#line 2498 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2499 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Float & Double constants if (!ConstantFP::isValueValidForType((yyvsp[-1].PrimType).T, (yyvsp[0].FPVal))) error("Floating point constant invalid for type"); @@ -4838,7 +4839,7 @@ yyreduce: break; case 163: -#line 2507 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2508 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type* SrcTy = (yyvsp[-3].ConstVal).C->getType(); const Type* DstTy = (yyvsp[-1].TypeVal).PAT->get(); @@ -4857,7 +4858,7 @@ yyreduce: break; case 164: -#line 2522 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2523 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-2].ConstVal).C->getType(); if (!isa<PointerType>(Ty)) @@ -4874,7 +4875,7 @@ yyreduce: break; case 165: -#line 2535 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2536 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if (!(yyvsp[-5].ConstVal).C->getType()->isInteger() || cast<IntegerType>((yyvsp[-5].ConstVal).C->getType())->getBitWidth() != 1) @@ -4887,7 +4888,7 @@ yyreduce: break; case 166: -#line 2544 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2545 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-3].ConstVal).C->getType(); if (Ty != (yyvsp[-1].ConstVal).C->getType()) @@ -4919,7 +4920,7 @@ yyreduce: break; case 167: -#line 2572 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2573 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type* Ty = (yyvsp[-3].ConstVal).C->getType(); if (Ty != (yyvsp[-1].ConstVal).C->getType()) @@ -4936,7 +4937,7 @@ yyreduce: break; case 168: -#line 2585 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2586 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type* Ty = (yyvsp[-3].ConstVal).C->getType(); if (Ty != (yyvsp[-1].ConstVal).C->getType()) @@ -4949,7 +4950,7 @@ yyreduce: break; case 169: -#line 2594 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2595 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[-3].ConstVal).C->getType() != (yyvsp[-1].ConstVal).C->getType()) error("icmp operand types must match"); @@ -4959,7 +4960,7 @@ yyreduce: break; case 170: -#line 2600 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2601 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[-3].ConstVal).C->getType() != (yyvsp[-1].ConstVal).C->getType()) error("fcmp operand types must match"); @@ -4969,7 +4970,7 @@ yyreduce: break; case 171: -#line 2606 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2607 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if (!(yyvsp[-1].ConstVal).C->getType()->isInteger() || cast<IntegerType>((yyvsp[-1].ConstVal).C->getType())->getBitWidth() != 8) @@ -4984,7 +4985,7 @@ yyreduce: break; case 172: -#line 2617 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2618 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C)) error("Invalid extractelement operands"); @@ -4994,7 +4995,7 @@ yyreduce: break; case 173: -#line 2623 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2624 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[-5].ConstVal).C, (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C)) error("Invalid insertelement operands"); @@ -5004,7 +5005,7 @@ yyreduce: break; case 174: -#line 2629 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2630 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[-5].ConstVal).C, (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C)) error("Invalid shufflevector operands"); @@ -5014,12 +5015,12 @@ yyreduce: break; case 175: -#line 2640 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2641 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { ((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal)); ;} break; case 176: -#line 2641 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2642 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ConstVector) = new std::vector<ConstInfo>(); (yyval.ConstVector)->push_back((yyvsp[0].ConstVal)); @@ -5027,17 +5028,17 @@ yyreduce: break; case 177: -#line 2650 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2651 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = false; ;} break; case 178: -#line 2651 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2652 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = true; ;} break; case 179: -#line 2663 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2664 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = ParserResult = (yyvsp[0].ModuleVal); CurModule.ModuleDone(); @@ -5045,27 +5046,27 @@ yyreduce: break; case 180: -#line 2672 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2673 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CurFun.FunctionDone(); ;} break; case 181: -#line 2673 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2674 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); ;} break; case 182: -#line 2674 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2675 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = (yyvsp[-3].ModuleVal); ;} break; case 183: -#line 2675 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2676 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); ;} break; case 184: -#line 2676 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2677 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = CurModule.CurrentModule; // Emit an error if there are any unresolved types left. @@ -5081,7 +5082,7 @@ yyreduce: break; case 185: -#line 2692 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2693 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Eagerly resolve types. This is not an optimization, this is a // requirement that is due to the fact that we could have this: @@ -5105,19 +5106,19 @@ yyreduce: break; case 186: -#line 2712 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2713 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Function prototypes can be in const pool ;} break; case 187: -#line 2714 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2715 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Asm blocks can be in the const pool ;} break; case 188: -#line 2716 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2717 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].ConstVal).C == 0) error("Global value initializer is not a constant"); @@ -5126,14 +5127,14 @@ yyreduce: break; case 189: -#line 2720 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2721 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { CurGV = 0; ;} break; case 190: -#line 2723 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2724 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[0].TypeVal).PAT->get(); CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalLinkage, (yyvsp[-1].BoolVal), Ty, 0, @@ -5143,14 +5144,14 @@ yyreduce: break; case 191: -#line 2728 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2729 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { CurGV = 0; ;} break; case 192: -#line 2731 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2732 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[0].TypeVal).PAT->get(); CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::DLLImportLinkage, (yyvsp[-1].BoolVal), Ty, 0, @@ -5160,14 +5161,14 @@ yyreduce: break; case 193: -#line 2736 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2737 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { CurGV = 0; ;} break; case 194: -#line 2739 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2740 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[0].TypeVal).PAT->get(); CurGV = @@ -5178,32 +5179,32 @@ yyreduce: break; case 195: -#line 2745 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2746 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { CurGV = 0; ;} break; case 196: -#line 2748 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2749 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { ;} break; case 197: -#line 2750 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2751 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { ;} break; case 198: -#line 2752 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2753 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { ;} break; case 199: -#line 2757 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2758 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true); @@ -5218,24 +5219,24 @@ yyreduce: break; case 200: -#line 2771 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2772 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Endianness) = Module::BigEndian; ;} break; case 201: -#line 2772 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2773 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Endianness) = Module::LittleEndian; ;} break; case 202: -#line 2776 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2777 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { CurModule.setEndianness((yyvsp[0].Endianness)); ;} break; case 203: -#line 2779 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2780 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].UInt64Val) == 32) CurModule.setPointerSize(Module::Pointer32); @@ -5247,7 +5248,7 @@ yyreduce: break; case 204: -#line 2787 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2788 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -5255,7 +5256,7 @@ yyreduce: break; case 205: -#line 2791 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2792 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -5263,7 +5264,7 @@ yyreduce: break; case 207: -#line 2802 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2803 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -5271,7 +5272,7 @@ yyreduce: break; case 208: -#line 2806 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2807 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -5279,17 +5280,17 @@ yyreduce: break; case 209: -#line 2810 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2811 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { ;} break; case 213: -#line 2823 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2824 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.StrVal) = 0; ;} break; case 214: -#line 2827 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2828 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[-1].TypeVal).PAT->get() == Type::VoidTy) error("void typed arguments are invalid"); @@ -5298,7 +5299,7 @@ yyreduce: break; case 215: -#line 2835 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2836 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = (yyvsp[-2].ArgList); (yyval.ArgList)->push_back(*(yyvsp[0].ArgVal)); @@ -5307,7 +5308,7 @@ yyreduce: break; case 216: -#line 2840 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2841 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = new std::vector<std::pair<PATypeInfo,char*> >(); (yyval.ArgList)->push_back(*(yyvsp[0].ArgVal)); @@ -5316,12 +5317,12 @@ yyreduce: break; case 217: -#line 2848 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2849 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = (yyvsp[0].ArgList); ;} break; case 218: -#line 2849 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2850 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = (yyvsp[-2].ArgList); PATypeInfo VoidTI; @@ -5332,7 +5333,7 @@ yyreduce: break; case 219: -#line 2856 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2857 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = new std::vector<std::pair<PATypeInfo,char*> >(); PATypeInfo VoidTI; @@ -5343,12 +5344,12 @@ yyreduce: break; case 220: -#line 2863 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2864 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = 0; ;} break; case 221: -#line 2867 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2868 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { UnEscapeLexed((yyvsp[-5].StrVal)); std::string FunctionName((yyvsp[-5].StrVal)); @@ -5531,12 +5532,12 @@ yyreduce: break; case 224: -#line 3053 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3054 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { CurFun.Linkage = (yyvsp[0].Linkage); ;} break; case 225: -#line 3053 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3054 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; @@ -5547,39 +5548,39 @@ yyreduce: break; case 228: -#line 3067 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3068 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); ;} break; case 229: -#line 3072 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3073 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 230: -#line 3073 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3074 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 231: -#line 3074 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3075 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 232: -#line 3078 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3079 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { CurFun.isDeclare = true; ;} break; case 233: -#line 3079 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3080 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { CurFun.Linkage = (yyvsp[0].Linkage); ;} break; case 234: -#line 3079 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3080 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; CurFun.FunctionDone(); @@ -5588,32 +5589,32 @@ yyreduce: break; case 235: -#line 3091 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3092 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = false; ;} break; case 236: -#line 3092 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3093 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = true; ;} break; case 237: -#line 3097 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3098 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val)); ;} break; case 238: -#line 3098 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3099 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val)); ;} break; case 239: -#line 3099 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3100 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal)); ;} break; case 240: -#line 3100 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3101 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::get(Type::Int1Ty, true)); (yyval.ValIDVal).S.makeUnsigned(); @@ -5621,7 +5622,7 @@ yyreduce: break; case 241: -#line 3104 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3105 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::get(Type::Int1Ty, false)); (yyval.ValIDVal).S.makeUnsigned(); @@ -5629,22 +5630,22 @@ yyreduce: break; case 242: -#line 3108 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3109 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::createNull(); ;} break; case 243: -#line 3109 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3110 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::createUndef(); ;} break; case 244: -#line 3110 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3111 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::createZeroInit(); ;} break; case 245: -#line 3111 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3112 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Nonempty unsized packed vector const Type *ETy = (*(yyvsp[-1].ConstVector))[0].C->getType(); int NumElements = (yyvsp[-1].ConstVector)->size(); @@ -5669,7 +5670,7 @@ yyreduce: break; case 246: -#line 3132 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3133 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal).C); (yyval.ValIDVal).S.copy((yyvsp[0].ConstVal).S); @@ -5677,7 +5678,7 @@ yyreduce: break; case 247: -#line 3136 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3137 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { char *End = UnEscapeLexed((yyvsp[-2].StrVal), true); std::string AsmStr = std::string((yyvsp[-2].StrVal), End); @@ -5690,17 +5691,17 @@ yyreduce: break; case 248: -#line 3150 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3151 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].SIntVal)); (yyval.ValIDVal).S.makeSignless(); ;} break; case 249: -#line 3151 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3152 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].StrVal)); (yyval.ValIDVal).S.makeSignless(); ;} break; case 252: -#line 3164 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3165 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-1].TypeVal).PAT->get(); (yyvsp[0].ValIDVal).S.copy((yyvsp[-1].TypeVal).S); @@ -5711,21 +5712,21 @@ yyreduce: break; case 253: -#line 3174 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3175 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); ;} break; case 254: -#line 3177 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3178 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Do not allow functions with 0 basic blocks (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); ;} break; case 255: -#line 3186 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3187 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { ValueInfo VI; VI.V = (yyvsp[0].TermInstVal).TI; VI.S.copy((yyvsp[0].TermInstVal).S); setValueName(VI, (yyvsp[-1].StrVal)); @@ -5737,7 +5738,7 @@ yyreduce: break; case 256: -#line 3197 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3198 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].InstVal).I) (yyvsp[-1].BasicBlockVal)->getInstList().push_back((yyvsp[0].InstVal).I); @@ -5746,7 +5747,7 @@ yyreduce: break; case 257: -#line 3202 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3203 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++),true); // Make sure to move the basic block to the correct location in the @@ -5759,7 +5760,7 @@ yyreduce: break; case 258: -#line 3211 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3212 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((yyvsp[0].StrVal)), true); // Make sure to move the basic block to the correct location in the @@ -5772,7 +5773,7 @@ yyreduce: break; case 261: -#line 3225 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3226 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Return with a result... (yyval.TermInstVal).TI = new ReturnInst((yyvsp[0].ValueVal).V); (yyval.TermInstVal).S.makeSignless(); @@ -5780,7 +5781,7 @@ yyreduce: break; case 262: -#line 3229 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3230 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Return with no result... (yyval.TermInstVal).TI = new ReturnInst(); (yyval.TermInstVal).S.makeSignless(); @@ -5788,7 +5789,7 @@ yyreduce: break; case 263: -#line 3233 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3234 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Unconditional Branch... BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); (yyval.TermInstVal).TI = new BranchInst(tmpBB); @@ -5797,7 +5798,7 @@ yyreduce: break; case 264: -#line 3238 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3239 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-3].ValIDVal).S.makeSignless(); (yyvsp[0].ValIDVal).S.makeSignless(); @@ -5811,7 +5812,7 @@ yyreduce: break; case 265: -#line 3248 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3249 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-6].ValIDVal).S.copy((yyvsp[-7].PrimType).S); Value* tmpVal = getVal((yyvsp[-7].PrimType).T, (yyvsp[-6].ValIDVal)); @@ -5833,7 +5834,7 @@ yyreduce: break; case 266: -#line 3266 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3267 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-5].ValIDVal).S.copy((yyvsp[-6].PrimType).S); Value* tmpVal = getVal((yyvsp[-6].PrimType).T, (yyvsp[-5].ValIDVal)); @@ -5846,7 +5847,7 @@ yyreduce: break; case 267: -#line 3276 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3277 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -5919,7 +5920,7 @@ yyreduce: break; case 268: -#line 3345 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3346 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TermInstVal).TI = new UnwindInst(); (yyval.TermInstVal).S.makeSignless(); @@ -5927,7 +5928,7 @@ yyreduce: break; case 269: -#line 3349 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3350 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TermInstVal).TI = new UnreachableInst(); (yyval.TermInstVal).S.makeSignless(); @@ -5935,7 +5936,7 @@ yyreduce: break; case 270: -#line 3356 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3357 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.JumpTable) = (yyvsp[-5].JumpTable); (yyvsp[-3].ValIDVal).S.copy((yyvsp[-4].PrimType).S); @@ -5951,7 +5952,7 @@ yyreduce: break; case 271: -#line 3368 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3369 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.JumpTable) = new std::vector<std::pair<Constant*, BasicBlock*> >(); (yyvsp[-3].ValIDVal).S.copy((yyvsp[-4].PrimType).S); @@ -5967,7 +5968,7 @@ yyreduce: break; case 272: -#line 3383 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3384 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { bool omit = false; if ((yyvsp[-1].StrVal)) @@ -6000,7 +6001,7 @@ yyreduce: break; case 273: -#line 3413 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3414 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Used for PHI nodes (yyval.PHIList).P = new std::list<std::pair<Value*, BasicBlock*> >(); (yyval.PHIList).S.copy((yyvsp[-5].TypeVal).S); @@ -6014,7 +6015,7 @@ yyreduce: break; case 274: -#line 3423 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3424 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.PHIList) = (yyvsp[-6].PHIList); (yyvsp[-3].ValIDVal).S.copy((yyvsp[-6].PHIList).S); @@ -6026,7 +6027,7 @@ yyreduce: break; case 275: -#line 3433 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3434 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Used for call statements, and memory insts... (yyval.ValueList) = new std::vector<ValueInfo>(); (yyval.ValueList)->push_back((yyvsp[0].ValueVal)); @@ -6034,7 +6035,7 @@ yyreduce: break; case 276: -#line 3437 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3438 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValueList) = (yyvsp[-2].ValueList); (yyvsp[-2].ValueList)->push_back((yyvsp[0].ValueVal)); @@ -6042,26 +6043,26 @@ yyreduce: break; case 278: -#line 3445 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3446 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValueList) = 0; ;} break; case 279: -#line 3449 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3450 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = true; ;} break; case 280: -#line 3452 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3453 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = false; ;} break; case 281: -#line 3458 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3459 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-2].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); (yyvsp[0].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); @@ -6084,7 +6085,7 @@ yyreduce: break; case 282: -#line 3477 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3478 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-2].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); (yyvsp[0].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); @@ -6106,7 +6107,7 @@ yyreduce: break; case 283: -#line 3495 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3496 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-2].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); (yyvsp[0].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); @@ -6126,7 +6127,7 @@ yyreduce: break; case 284: -#line 3511 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3512 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-2].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); (yyvsp[0].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); @@ -6144,7 +6145,7 @@ yyreduce: break; case 285: -#line 3525 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3526 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-2].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); (yyvsp[0].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); @@ -6162,7 +6163,7 @@ yyreduce: break; case 286: -#line 3539 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3540 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { warning("Use of obsolete 'not' instruction: Replacing with 'xor"); const Type *Ty = (yyvsp[0].ValueVal).V->getType(); @@ -6177,7 +6178,7 @@ yyreduce: break; case 287: -#line 3550 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3551 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if (!(yyvsp[0].ValueVal).V->getType()->isInteger() || cast<IntegerType>((yyvsp[0].ValueVal).V->getType())->getBitWidth() != 8) @@ -6199,7 +6200,7 @@ yyreduce: break; case 288: -#line 3568 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3569 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type *DstTy = (yyvsp[0].TypeVal).PAT->get(); if (!DstTy->isFirstClassType()) @@ -6212,7 +6213,7 @@ yyreduce: break; case 289: -#line 3577 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3578 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if (!(yyvsp[-4].ValueVal).V->getType()->isInteger() || cast<IntegerType>((yyvsp[-4].ValueVal).V->getType())->getBitWidth() != 1) @@ -6225,7 +6226,7 @@ yyreduce: break; case 290: -#line 3586 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3587 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[0].TypeVal).PAT->get(); NewVarArgs = true; @@ -6236,7 +6237,7 @@ yyreduce: break; case 291: -#line 3593 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3594 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type* ArgTy = (yyvsp[-2].ValueVal).V->getType(); const Type* DstTy = (yyvsp[0].TypeVal).PAT->get(); @@ -6261,7 +6262,7 @@ yyreduce: break; case 292: -#line 3614 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3615 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type* ArgTy = (yyvsp[-2].ValueVal).V->getType(); const Type* DstTy = (yyvsp[0].TypeVal).PAT->get(); @@ -6289,7 +6290,7 @@ yyreduce: break; case 293: -#line 3638 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3639 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[-2].ValueVal).V, (yyvsp[0].ValueVal).V)) error("Invalid extractelement operands"); @@ -6299,7 +6300,7 @@ yyreduce: break; case 294: -#line 3644 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3645 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[-4].ValueVal).V, (yyvsp[-2].ValueVal).V, (yyvsp[0].ValueVal).V)) error("Invalid insertelement operands"); @@ -6309,7 +6310,7 @@ yyreduce: break; case 295: -#line 3650 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3651 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[-4].ValueVal).V, (yyvsp[-2].ValueVal).V, (yyvsp[0].ValueVal).V)) error("Invalid shufflevector operands"); @@ -6319,7 +6320,7 @@ yyreduce: break; case 296: -#line 3656 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3657 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[0].PHIList).P->front().first->getType(); if (!Ty->isFirstClassType()) @@ -6339,7 +6340,7 @@ yyreduce: break; case 297: -#line 3672 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3673 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { // Handle the short call syntax const PointerType *PFTy; @@ -6433,34 +6434,34 @@ yyreduce: break; case 298: -#line 3762 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3763 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.InstVal) = (yyvsp[0].InstVal); ;} break; case 299: -#line 3770 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3771 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValueList) = (yyvsp[0].ValueList); ;} break; case 300: -#line 3771 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3772 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValueList) = new std::vector<ValueInfo>(); ;} break; case 301: -#line 3775 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3776 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = true; ;} break; case 302: -#line 3776 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3777 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = false; ;} break; case 303: -#line 3780 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3781 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-1].TypeVal).PAT->get(); (yyval.InstVal).S.makeComposite((yyvsp[-1].TypeVal).S); @@ -6470,7 +6471,7 @@ yyreduce: break; case 304: -#line 3786 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3787 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-4].TypeVal).PAT->get(); (yyvsp[-1].ValIDVal).S.makeUnsigned(); @@ -6481,7 +6482,7 @@ yyreduce: break; case 305: -#line 3793 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3794 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-1].TypeVal).PAT->get(); (yyval.InstVal).S.makeComposite((yyvsp[-1].TypeVal).S); @@ -6491,7 +6492,7 @@ yyreduce: break; case 306: -#line 3799 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3800 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-4].TypeVal).PAT->get(); (yyvsp[-1].ValIDVal).S.makeUnsigned(); @@ -6502,7 +6503,7 @@ yyreduce: break; case 307: -#line 3806 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3807 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type *PTy = (yyvsp[0].ValueVal).V->getType(); if (!isa<PointerType>(PTy)) @@ -6513,7 +6514,7 @@ yyreduce: break; case 308: -#line 3813 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3814 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { const Type* Ty = (yyvsp[-1].TypeVal).PAT->get(); (yyvsp[0].ValIDVal).S.copy((yyvsp[-1].TypeVal).S); @@ -6530,7 +6531,7 @@ yyreduce: break; case 309: -#line 3826 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3827 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[0].ValIDVal).S.copy((yyvsp[-1].TypeVal).S); const PointerType *PTy = dyn_cast<PointerType>((yyvsp[-1].TypeVal).PAT->get()); @@ -6560,7 +6561,7 @@ yyreduce: break; case 310: -#line 3852 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3853 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-1].ValIDVal).S.copy((yyvsp[-2].TypeVal).S); const Type* Ty = (yyvsp[-2].TypeVal).PAT->get(); @@ -6584,7 +6585,7 @@ yyreduce: } /* Line 1126 of yacc.c. */ -#line 6588 "UpgradeParser.tab.c" +#line 6589 "UpgradeParser.tab.c" yyvsp -= yylen; yyssp -= yylen; @@ -6852,7 +6853,7 @@ yyreturn: } -#line 3870 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3871 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" int yyerror(const char *ErrorMsg) { diff --git a/tools/llvm-upgrade/UpgradeParser.h.cvs b/tools/llvm-upgrade/UpgradeParser.h.cvs index 279a087..5c20641 100644 --- a/tools/llvm-upgrade/UpgradeParser.h.cvs +++ b/tools/llvm-upgrade/UpgradeParser.h.cvs @@ -335,7 +335,7 @@ #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 1741 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1742 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; diff --git a/tools/llvm-upgrade/UpgradeParser.y.cvs b/tools/llvm-upgrade/UpgradeParser.y.cvs index 1751912..0173b44 100644 --- a/tools/llvm-upgrade/UpgradeParser.y.cvs +++ b/tools/llvm-upgrade/UpgradeParser.y.cvs @@ -774,7 +774,8 @@ static void ResolveTypeTo(char *Name, const Type *ToTy, const Signedness& Sign){ D = ValID::create((int)CurModule.Types.size()); D.S.copy(Sign); - CurModule.NamedTypeSigns[Name] = Sign; + if (Name) + CurModule.NamedTypeSigns[Name] = Sign; std::map<ValID, PATypeHolder>::iterator I = CurModule.LateResolveTypes.find(D); |