diff --git a/lib/AsmParser/llvmAsmParser.cpp.cvs b/lib/AsmParser/llvmAsmParser.cpp.cvs index a47b9a59c6a..361027cf4b5 100644 --- a/lib/AsmParser/llvmAsmParser.cpp.cvs +++ b/lib/AsmParser/llvmAsmParser.cpp.cvs @@ -716,7 +716,7 @@ static Value *getExistingVal(const Type *Ty, const ValID &D) { Ty->getDescription() + "'"); return 0; } - return ConstantInt::get(Ty, D.ConstPool64); + return ConstantInt::get(Ty, D.ConstPool64, true); case ValID::ConstUIntVal: // Is it an unsigned const pool reference? if (!ConstantInt::isValueValidForType(Ty, D.UConstPool64)) { @@ -725,7 +725,7 @@ static Value *getExistingVal(const Type *Ty, const ValID &D) { "' is invalid or out of range"); return 0; } else { // This is really a signed reference. Transmogrify. - return ConstantInt::get(Ty, D.ConstPool64); + return ConstantInt::get(Ty, D.ConstPool64, true); } } else { return ConstantInt::get(Ty, D.UConstPool64); @@ -1695,20 +1695,20 @@ static const unsigned short int yyrline[] = 1272, 1279, 1284, 1292, 1310, 1328, 1333, 1345, 1355, 1359, 1369, 1376, 1383, 1390, 1395, 1400, 1407, 1408, 1415, 1422, 1430, 1435, 1446, 1474, 1490, 1519, 1547, 1572, 1591, 1617, - 1637, 1649, 1656, 1722, 1732, 1742, 1751, 1761, 1769, 1779, - 1784, 1789, 1797, 1809, 1831, 1839, 1845, 1856, 1861, 1866, - 1872, 1878, 1887, 1891, 1899, 1899, 1910, 1915, 1923, 1924, - 1928, 1928, 1932, 1932, 1935, 1938, 1950, 1974, 1985, 1985, - 1995, 1995, 2003, 2003, 2013, 2016, 2022, 2035, 2039, 2044, - 2046, 2051, 2056, 2065, 2075, 2086, 2090, 2099, 2108, 2113, - 2225, 2225, 2227, 2236, 2236, 2238, 2243, 2255, 2259, 2264, - 2268, 2272, 2276, 2280, 2284, 2288, 2292, 2296, 2321, 2325, - 2339, 2343, 2347, 2351, 2357, 2357, 2363, 2372, 2376, 2385, - 2394, 2403, 2407, 2412, 2416, 2420, 2425, 2435, 2454, 2463, - 2530, 2534, 2541, 2552, 2565, 2575, 2586, 2596, 2604, 2612, - 2615, 2616, 2623, 2627, 2632, 2653, 2670, 2683, 2696, 2708, - 2716, 2723, 2729, 2735, 2741, 2756, 2820, 2825, 2829, 2836, - 2843, 2851, 2858, 2866, 2874, 2888, 2905 + 1637, 1649, 1656, 1722, 1732, 1742, 1748, 1758, 1764, 1774, + 1779, 1784, 1792, 1804, 1826, 1834, 1840, 1851, 1856, 1861, + 1867, 1873, 1882, 1886, 1894, 1894, 1905, 1910, 1918, 1919, + 1923, 1923, 1927, 1927, 1930, 1933, 1945, 1969, 1980, 1980, + 1990, 1990, 1998, 1998, 2008, 2011, 2017, 2030, 2034, 2039, + 2041, 2046, 2051, 2060, 2070, 2081, 2085, 2094, 2103, 2108, + 2220, 2220, 2222, 2231, 2231, 2233, 2238, 2250, 2254, 2259, + 2263, 2267, 2271, 2275, 2279, 2283, 2287, 2291, 2316, 2320, + 2334, 2338, 2342, 2346, 2352, 2352, 2358, 2367, 2371, 2380, + 2389, 2398, 2402, 2407, 2411, 2415, 2420, 2430, 2449, 2458, + 2525, 2529, 2536, 2547, 2560, 2570, 2581, 2591, 2599, 2607, + 2610, 2611, 2618, 2622, 2627, 2648, 2665, 2678, 2691, 2703, + 2711, 2718, 2724, 2730, 2736, 2751, 2815, 2820, 2824, 2831, + 2838, 2846, 2853, 2861, 2869, 2883, 2900 }; #endif @@ -4058,16 +4058,13 @@ yyreduce: { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val))) GEN_ERROR("Constant value doesn't fit in type"); - APInt Val(64, (yyvsp[0].SInt64Val)); - uint32_t BitWidth = cast((yyvsp[-1].PrimType))->getBitWidth(); - Val.sextOrTrunc(BitWidth); - (yyval.ConstVal) = ConstantInt::get(Val); + (yyval.ConstVal) = ConstantInt::get((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val), true); CHECK_FOR_ERROR ;} break; case 156: -#line 1751 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1748 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants uint32_t BitWidth = cast((yyvsp[-1].PrimType))->getBitWidth(); if ((yyvsp[0].APIntVal)->getBitWidth() > BitWidth) { @@ -4081,19 +4078,17 @@ yyreduce: break; case 157: -#line 1761 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1758 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val))) GEN_ERROR("Constant value doesn't fit in type"); - uint32_t BitWidth = cast((yyvsp[-1].PrimType))->getBitWidth(); - APInt Val(BitWidth, (yyvsp[0].UInt64Val)); - (yyval.ConstVal) = ConstantInt::get(Val); + (yyval.ConstVal) = ConstantInt::get((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val), false); CHECK_FOR_ERROR ;} break; case 158: -#line 1769 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1764 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants uint32_t BitWidth = cast((yyvsp[-1].PrimType))->getBitWidth(); if ((yyvsp[0].APIntVal)->getBitWidth() > BitWidth) { @@ -4107,7 +4102,7 @@ yyreduce: break; case 159: -#line 1779 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1774 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Boolean constants assert(cast((yyvsp[-1].PrimType))->getBitWidth() == 1 && "Not Bool?"); (yyval.ConstVal) = ConstantInt::getTrue(); @@ -4116,7 +4111,7 @@ yyreduce: break; case 160: -#line 1784 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1779 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Boolean constants assert(cast((yyvsp[-1].PrimType))->getBitWidth() == 1 && "Not Bool?"); (yyval.ConstVal) = ConstantInt::getFalse(); @@ -4125,7 +4120,7 @@ yyreduce: break; case 161: -#line 1789 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1784 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Float & Double constants if (!ConstantFP::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].FPVal))) GEN_ERROR("Floating point constant invalid for type"); @@ -4135,7 +4130,7 @@ yyreduce: break; case 162: -#line 1797 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1792 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); @@ -4151,7 +4146,7 @@ yyreduce: break; case 163: -#line 1809 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1804 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[-2].ConstVal)->getType())) GEN_ERROR("GetElementPtr requires a pointer operand"); @@ -4177,7 +4172,7 @@ yyreduce: break; case 164: -#line 1831 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1826 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-5].ConstVal)->getType() != Type::Int1Ty) GEN_ERROR("Select condition must be of boolean type"); @@ -4189,7 +4184,7 @@ yyreduce: break; case 165: -#line 1839 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1834 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("Binary operator types must match"); @@ -4199,7 +4194,7 @@ yyreduce: break; case 166: -#line 1845 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1840 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("Logical operator types must match"); @@ -4214,7 +4209,7 @@ yyreduce: break; case 167: -#line 1856 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1851 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("icmp operand types must match"); @@ -4223,7 +4218,7 @@ yyreduce: break; case 168: -#line 1861 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1856 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) GEN_ERROR("fcmp operand types must match"); @@ -4232,7 +4227,7 @@ yyreduce: break; case 169: -#line 1866 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1861 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid extractelement operands"); @@ -4242,7 +4237,7 @@ yyreduce: break; case 170: -#line 1872 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1867 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid insertelement operands"); @@ -4252,7 +4247,7 @@ yyreduce: break; case 171: -#line 1878 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1873 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -4262,7 +4257,7 @@ yyreduce: break; case 172: -#line 1887 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1882 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { ((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal)); CHECK_FOR_ERROR @@ -4270,7 +4265,7 @@ yyreduce: break; case 173: -#line 1891 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1886 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector) = new std::vector(); (yyval.ConstVector)->push_back((yyvsp[0].ConstVal)); @@ -4279,17 +4274,17 @@ yyreduce: break; case 174: -#line 1899 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1894 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; case 175: -#line 1899 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1894 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; case 176: -#line 1910 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1905 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -4298,7 +4293,7 @@ yyreduce: break; case 177: -#line 1915 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1910 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -4307,12 +4302,12 @@ yyreduce: break; case 180: -#line 1928 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1923 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = false; ;} break; case 181: -#line 1928 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1923 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { CurFun.FunctionDone(); CHECK_FOR_ERROR @@ -4320,26 +4315,26 @@ yyreduce: break; case 182: -#line 1932 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1927 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ;} break; case 183: -#line 1932 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1927 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 184: -#line 1935 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1930 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 185: -#line 1938 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1933 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Emit an error if there are any unresolved types left. if (!CurModule.LateResolveTypes.empty()) { @@ -4355,7 +4350,7 @@ yyreduce: break; case 186: -#line 1950 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1945 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); @@ -4383,7 +4378,7 @@ yyreduce: break; case 187: -#line 1974 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1969 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { ResolveTypeTo((yyvsp[-2].StrVal), (yyvsp[0].PrimType)); @@ -4398,7 +4393,7 @@ yyreduce: break; case 188: -#line 1985 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1980 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { /* "Externally Visible" Linkage */ if ((yyvsp[0].ConstVal) == 0) @@ -4410,14 +4405,14 @@ yyreduce: break; case 189: -#line 1992 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1987 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; case 190: -#line 1995 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1990 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[0].ConstVal) == 0) GEN_ERROR("Global value initializer is not a constant"); @@ -4427,14 +4422,14 @@ yyreduce: break; case 191: -#line 2000 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1995 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; case 192: -#line 2003 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 1998 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); @@ -4445,7 +4440,7 @@ yyreduce: break; case 193: -#line 2009 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2004 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR @@ -4453,21 +4448,21 @@ yyreduce: break; case 194: -#line 2013 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2008 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 195: -#line 2016 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2011 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 196: -#line 2022 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2017 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true); @@ -4483,7 +4478,7 @@ yyreduce: break; case 197: -#line 2035 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2030 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4491,7 +4486,7 @@ yyreduce: break; case 198: -#line 2039 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2034 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4499,7 +4494,7 @@ yyreduce: break; case 200: -#line 2046 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2041 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4508,7 +4503,7 @@ yyreduce: break; case 201: -#line 2051 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2046 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4517,14 +4512,14 @@ yyreduce: break; case 202: -#line 2056 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2051 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 203: -#line 2065 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2060 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); @@ -4538,7 +4533,7 @@ yyreduce: break; case 204: -#line 2075 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2070 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); @@ -4552,7 +4547,7 @@ yyreduce: break; case 205: -#line 2086 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2081 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[0].ArgList); CHECK_FOR_ERROR @@ -4560,7 +4555,7 @@ yyreduce: break; case 206: -#line 2090 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2085 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[-2].ArgList); struct ArgListEntry E; @@ -4573,7 +4568,7 @@ yyreduce: break; case 207: -#line 2099 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2094 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = new ArgListType; struct ArgListEntry E; @@ -4586,7 +4581,7 @@ yyreduce: break; case 208: -#line 2108 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2103 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = 0; CHECK_FOR_ERROR @@ -4594,7 +4589,7 @@ yyreduce: break; case 209: -#line 2114 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2109 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { UnEscapeLexed((yyvsp[-6].StrVal)); std::string FunctionName((yyvsp[-6].StrVal)); @@ -4708,7 +4703,7 @@ yyreduce: break; case 212: -#line 2227 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2222 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; @@ -4720,7 +4715,7 @@ yyreduce: break; case 215: -#line 2238 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2233 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR @@ -4728,7 +4723,7 @@ yyreduce: break; case 216: -#line 2243 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2238 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { CurFun.CurrentFunction->setLinkage((yyvsp[-2].Linkage)); CurFun.CurrentFunction->setVisibility((yyvsp[-1].Visibility)); @@ -4739,7 +4734,7 @@ yyreduce: break; case 217: -#line 2255 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2250 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -4747,7 +4742,7 @@ yyreduce: break; case 218: -#line 2259 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2254 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -4755,7 +4750,7 @@ yyreduce: break; case 219: -#line 2264 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2259 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant (yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val)); CHECK_FOR_ERROR @@ -4763,7 +4758,7 @@ yyreduce: break; case 220: -#line 2268 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2263 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val)); CHECK_FOR_ERROR @@ -4771,7 +4766,7 @@ yyreduce: break; case 221: -#line 2272 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2267 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? (yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal)); CHECK_FOR_ERROR @@ -4779,7 +4774,7 @@ yyreduce: break; case 222: -#line 2276 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2271 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getTrue()); CHECK_FOR_ERROR @@ -4787,7 +4782,7 @@ yyreduce: break; case 223: -#line 2280 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2275 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getFalse()); CHECK_FOR_ERROR @@ -4795,7 +4790,7 @@ yyreduce: break; case 224: -#line 2284 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2279 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createNull(); CHECK_FOR_ERROR @@ -4803,7 +4798,7 @@ yyreduce: break; case 225: -#line 2288 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2283 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createUndef(); CHECK_FOR_ERROR @@ -4811,7 +4806,7 @@ yyreduce: break; case 226: -#line 2292 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2287 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // A vector zero constant. (yyval.ValIDVal) = ValID::createZeroInit(); CHECK_FOR_ERROR @@ -4819,7 +4814,7 @@ yyreduce: break; case 227: -#line 2296 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2291 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*(yyvsp[-1].ConstVector))[0]->getType(); int NumElements = (yyvsp[-1].ConstVector)->size(); @@ -4848,7 +4843,7 @@ yyreduce: break; case 228: -#line 2321 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2316 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal)); CHECK_FOR_ERROR @@ -4856,7 +4851,7 @@ yyreduce: break; case 229: -#line 2325 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2320 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { char *End = UnEscapeLexed((yyvsp[-2].StrVal), true); std::string AsmStr = std::string((yyvsp[-2].StrVal), End); @@ -4870,7 +4865,7 @@ yyreduce: break; case 230: -#line 2339 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2334 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? (yyval.ValIDVal) = ValID::createLocalID((yyvsp[0].UIntVal)); CHECK_FOR_ERROR @@ -4878,7 +4873,7 @@ yyreduce: break; case 231: -#line 2343 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2338 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createGlobalID((yyvsp[0].UIntVal)); CHECK_FOR_ERROR @@ -4886,7 +4881,7 @@ yyreduce: break; case 232: -#line 2347 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2342 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createLocalName((yyvsp[0].StrVal)); CHECK_FOR_ERROR @@ -4894,7 +4889,7 @@ yyreduce: break; case 233: -#line 2351 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2346 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createGlobalName((yyvsp[0].StrVal)); CHECK_FOR_ERROR @@ -4902,7 +4897,7 @@ yyreduce: break; case 236: -#line 2363 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2358 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); @@ -4913,7 +4908,7 @@ yyreduce: break; case 237: -#line 2372 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2367 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR @@ -4921,7 +4916,7 @@ yyreduce: break; case 238: -#line 2376 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2371 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); CHECK_FOR_ERROR @@ -4929,7 +4924,7 @@ yyreduce: break; case 239: -#line 2385 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2380 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { setValueName((yyvsp[0].TermInstVal), (yyvsp[-1].StrVal)); CHECK_FOR_ERROR @@ -4941,7 +4936,7 @@ yyreduce: break; case 240: -#line 2394 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2389 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (CastInst *CI1 = dyn_cast((yyvsp[0].InstVal))) if (CastInst *CI2 = dyn_cast(CI1->getOperand(0))) @@ -4954,7 +4949,7 @@ yyreduce: break; case 241: -#line 2403 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2398 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Empty space between instruction lists (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalID(CurFun.NextValNum)); CHECK_FOR_ERROR @@ -4962,7 +4957,7 @@ yyreduce: break; case 242: -#line 2407 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2402 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Labelled (named) basic block (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalName((yyvsp[0].StrVal))); CHECK_FOR_ERROR @@ -4970,7 +4965,7 @@ yyreduce: break; case 243: -#line 2412 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2407 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Return with a result... (yyval.TermInstVal) = new ReturnInst((yyvsp[0].ValueVal)); CHECK_FOR_ERROR @@ -4978,7 +4973,7 @@ yyreduce: break; case 244: -#line 2416 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2411 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Return with no result... (yyval.TermInstVal) = new ReturnInst(); CHECK_FOR_ERROR @@ -4986,7 +4981,7 @@ yyreduce: break; case 245: -#line 2420 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2415 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); CHECK_FOR_ERROR @@ -4995,7 +4990,7 @@ yyreduce: break; case 246: -#line 2425 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2420 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { assert(cast((yyvsp[-7].PrimType))->getBitWidth() == 1 && "Not Bool?"); BasicBlock* tmpBBA = getBBVal((yyvsp[-3].ValIDVal)); @@ -5009,7 +5004,7 @@ yyreduce: break; case 247: -#line 2435 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2430 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-7].PrimType), (yyvsp[-6].ValIDVal)); CHECK_FOR_ERROR @@ -5032,7 +5027,7 @@ yyreduce: break; case 248: -#line 2454 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2449 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[-6].PrimType), (yyvsp[-5].ValIDVal)); CHECK_FOR_ERROR @@ -5045,7 +5040,7 @@ yyreduce: break; case 249: -#line 2464 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2459 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -5115,7 +5110,7 @@ yyreduce: break; case 250: -#line 2530 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2525 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnwindInst(); CHECK_FOR_ERROR @@ -5123,7 +5118,7 @@ yyreduce: break; case 251: -#line 2534 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2529 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnreachableInst(); CHECK_FOR_ERROR @@ -5131,7 +5126,7 @@ yyreduce: break; case 252: -#line 2541 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2536 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = (yyvsp[-5].JumpTable); Constant *V = cast(getExistingVal((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal))); @@ -5146,7 +5141,7 @@ yyreduce: break; case 253: -#line 2552 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2547 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = new std::vector >(); Constant *V = cast(getExistingVal((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal))); @@ -5162,7 +5157,7 @@ yyreduce: break; case 254: -#line 2565 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2560 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName((yyvsp[0].InstVal), (yyvsp[-1].StrVal)); @@ -5174,7 +5169,7 @@ yyreduce: break; case 255: -#line 2575 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2570 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-5].TypeVal))->getDescription()); @@ -5189,7 +5184,7 @@ yyreduce: break; case 256: -#line 2586 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2581 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.PHIList) = (yyvsp[-6].PHIList); Value* tmpVal = getVal((yyvsp[-6].PHIList)->front().first->getType(), (yyvsp[-3].ValIDVal)); @@ -5201,7 +5196,7 @@ yyreduce: break; case 257: -#line 2596 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2591 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); @@ -5213,7 +5208,7 @@ yyreduce: break; case 258: -#line 2604 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2599 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); @@ -5225,17 +5220,17 @@ yyreduce: break; case 259: -#line 2612 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2607 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueRefList) = new ValueRefList(); ;} break; case 260: -#line 2615 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2610 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); ;} break; case 261: -#line 2616 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2611 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[-2].ValueList); (yyval.ValueList)->push_back((yyvsp[0].ValueVal)); @@ -5244,7 +5239,7 @@ yyreduce: break; case 262: -#line 2623 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2618 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -5252,7 +5247,7 @@ yyreduce: break; case 263: -#line 2627 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2622 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -5260,7 +5255,7 @@ yyreduce: break; case 264: -#line 2632 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2627 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription()); @@ -5285,7 +5280,7 @@ yyreduce: break; case 265: -#line 2653 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2648 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription()); @@ -5306,7 +5301,7 @@ yyreduce: break; case 266: -#line 2670 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2665 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription()); @@ -5323,7 +5318,7 @@ yyreduce: break; case 267: -#line 2683 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2678 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription()); @@ -5340,7 +5335,7 @@ yyreduce: break; case 268: -#line 2696 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2691 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); @@ -5356,7 +5351,7 @@ yyreduce: break; case 269: -#line 2708 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2703 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[-4].ValueVal)->getType() != Type::Int1Ty) GEN_ERROR("select condition must be boolean"); @@ -5368,7 +5363,7 @@ yyreduce: break; case 270: -#line 2716 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2711 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); @@ -5379,7 +5374,7 @@ yyreduce: break; case 271: -#line 2723 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2718 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid extractelement operands"); @@ -5389,7 +5384,7 @@ yyreduce: break; case 272: -#line 2729 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2724 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid insertelement operands"); @@ -5399,7 +5394,7 @@ yyreduce: break; case 273: -#line 2735 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2730 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -5409,7 +5404,7 @@ yyreduce: break; case 274: -#line 2741 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2736 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[0].PHIList)->front().first->getType(); if (!Ty->isFirstClassType()) @@ -5428,7 +5423,7 @@ yyreduce: break; case 275: -#line 2757 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2752 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -5495,7 +5490,7 @@ yyreduce: break; case 276: -#line 2820 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2815 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = (yyvsp[0].InstVal); CHECK_FOR_ERROR @@ -5503,7 +5498,7 @@ yyreduce: break; case 277: -#line 2825 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2820 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -5511,7 +5506,7 @@ yyreduce: break; case 278: -#line 2829 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2824 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -5519,7 +5514,7 @@ yyreduce: break; case 279: -#line 2836 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2831 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); @@ -5530,7 +5525,7 @@ yyreduce: break; case 280: -#line 2843 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2838 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-4].TypeVal))->getDescription()); @@ -5542,7 +5537,7 @@ yyreduce: break; case 281: -#line 2851 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2846 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); @@ -5553,7 +5548,7 @@ yyreduce: break; case 282: -#line 2858 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2853 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-4].TypeVal))->getDescription()); @@ -5565,7 +5560,7 @@ yyreduce: break; case 283: -#line 2866 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2861 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[0].ValueVal)->getType())) GEN_ERROR("Trying to free nonpointer type " + @@ -5576,7 +5571,7 @@ yyreduce: break; case 284: -#line 2874 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2869 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); @@ -5594,7 +5589,7 @@ yyreduce: break; case 285: -#line 2888 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2883 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); @@ -5615,7 +5610,7 @@ yyreduce: break; case 286: -#line 2905 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2900 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); @@ -5638,7 +5633,7 @@ yyreduce: } /* Line 1126 of yacc.c. */ -#line 5642 "llvmAsmParser.tab.c" +#line 5637 "llvmAsmParser.tab.c" yyvsp -= yylen; yyssp -= yylen; @@ -5906,7 +5901,7 @@ yyreturn: } -#line 2922 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" +#line 2917 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" // common code from the two 'RunVMAsmParser' functions diff --git a/lib/AsmParser/llvmAsmParser.y.cvs b/lib/AsmParser/llvmAsmParser.y.cvs index b929067c37c..aac87d6c6b3 100644 --- a/lib/AsmParser/llvmAsmParser.y.cvs +++ b/lib/AsmParser/llvmAsmParser.y.cvs @@ -392,7 +392,7 @@ static Value *getExistingVal(const Type *Ty, const ValID &D) { Ty->getDescription() + "'"); return 0; } - return ConstantInt::get(Ty, D.ConstPool64); + return ConstantInt::get(Ty, D.ConstPool64, true); case ValID::ConstUIntVal: // Is it an unsigned const pool reference? if (!ConstantInt::isValueValidForType(Ty, D.UConstPool64)) { @@ -401,7 +401,7 @@ static Value *getExistingVal(const Type *Ty, const ValID &D) { "' is invalid or out of range"); return 0; } else { // This is really a signed reference. Transmogrify. - return ConstantInt::get(Ty, D.ConstPool64); + return ConstantInt::get(Ty, D.ConstPool64, true); } } else { return ConstantInt::get(Ty, D.UConstPool64); @@ -1742,10 +1742,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr | IntType ESINT64VAL { // integral constants if (!ConstantInt::isValueValidForType($1, $2)) GEN_ERROR("Constant value doesn't fit in type"); - APInt Val(64, $2); - uint32_t BitWidth = cast($1)->getBitWidth(); - Val.sextOrTrunc(BitWidth); - $$ = ConstantInt::get(Val); + $$ = ConstantInt::get($1, $2, true); CHECK_FOR_ERROR } | IntType ESAPINTVAL { // arbitrary precision integer constants @@ -1761,9 +1758,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr | IntType EUINT64VAL { // integral constants if (!ConstantInt::isValueValidForType($1, $2)) GEN_ERROR("Constant value doesn't fit in type"); - uint32_t BitWidth = cast($1)->getBitWidth(); - APInt Val(BitWidth, $2); - $$ = ConstantInt::get(Val); + $$ = ConstantInt::get($1, $2, false); CHECK_FOR_ERROR } | IntType EUAPINTVAL { // arbitrary precision integer constants