[llvm-commits] [SignlessTypes] CVS: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y.cvs
Reid Spencer
reid at x10sys.com
Sun Oct 22 23:25:42 PDT 2006
Changes in directory llvm/lib/AsmParser:
llvmAsmParser.cpp.cvs updated: 1.18.2.6 -> 1.18.2.7
llvmAsmParser.h.cvs updated: 1.13.2.6 -> 1.13.2.7
llvmAsmParser.y.cvs updated: 1.18.2.6 -> 1.18.2.7
---
Log message:
Regenerate.
---
Diffs of the changes: (+239 -227)
llvmAsmParser.cpp.cvs | 456 +++++++++++++++++++++++++-------------------------
llvmAsmParser.h.cvs | 2
llvmAsmParser.y.cvs | 8
3 files changed, 239 insertions(+), 227 deletions(-)
Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs
diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.18.2.6 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.18.2.7
--- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.18.2.6 Sun Oct 22 03:59:00 2006
+++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs Mon Oct 23 01:25:18 2006
@@ -1091,7 +1091,13 @@
return Ty;
}
-// This function is
+// This template function is used to obtain the correct opcode for an
+// instruction when an obsolete opcode is encountered. The OpcodeInfo template
+// keeps track of the opcode and the "obsolete" flag. These are generated by
+// the lexer and obsolete will be true when the lexer encounters the token for
+// an obsolete opcode. For example, "div" was replaced by [usf]div but we need
+// to maintain backwards compatibility for asm files that still have the "div"
+// instruction. This function handles converting div -> [usf]div appropriately.
template <class EnumKind>
static void sanitizeOpCode(OpcodeInfo<EnumKind> &OI, const PATypeHolder& Ty) {
if (OI.obsolete) {
@@ -1293,7 +1299,7 @@
#endif
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 999 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1005 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
typedef union YYSTYPE {
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
@@ -1334,7 +1340,7 @@
llvm::Module::Endianness Endianness;
} YYSTYPE;
/* Line 196 of yacc.c. */
-#line 1338 "llvmAsmParser.tab.c"
+#line 1344 "llvmAsmParser.tab.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
@@ -1346,7 +1352,7 @@
/* Line 219 of yacc.c. */
-#line 1350 "llvmAsmParser.tab.c"
+#line 1356 "llvmAsmParser.tab.c"
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
@@ -1681,32 +1687,32 @@
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const unsigned short int yyrline[] =
{
- 0, 1122, 1122, 1123, 1131, 1132, 1142, 1142, 1142, 1142,
- 1142, 1142, 1142, 1143, 1143, 1143, 1144, 1144, 1144, 1144,
- 1144, 1144, 1146, 1146, 1150, 1150, 1150, 1150, 1151, 1151,
- 1151, 1151, 1152, 1152, 1153, 1153, 1156, 1160, 1165, 1166,
- 1167, 1168, 1169, 1170, 1171, 1172, 1174, 1175, 1176, 1177,
- 1178, 1179, 1180, 1181, 1190, 1191, 1197, 1198, 1206, 1214,
- 1215, 1220, 1221, 1222, 1227, 1241, 1241, 1242, 1242, 1244,
- 1254, 1254, 1254, 1254, 1254, 1254, 1254, 1255, 1255, 1255,
- 1255, 1255, 1255, 1256, 1260, 1264, 1272, 1280, 1293, 1298,
- 1310, 1320, 1324, 1335, 1340, 1346, 1347, 1351, 1355, 1366,
- 1392, 1406, 1436, 1462, 1483, 1496, 1506, 1511, 1572, 1579,
- 1588, 1594, 1600, 1604, 1608, 1616, 1627, 1659, 1667, 1691,
- 1702, 1708, 1716, 1722, 1728, 1737, 1741, 1749, 1749, 1759,
- 1767, 1772, 1776, 1780, 1784, 1799, 1821, 1824, 1827, 1827,
- 1835, 1835, 1843, 1843, 1851, 1851, 1860, 1863, 1866, 1870,
- 1883, 1884, 1886, 1890, 1899, 1904, 1910, 1912, 1917, 1922,
- 1931, 1931, 1932, 1932, 1934, 1941, 1947, 1954, 1958, 1964,
- 1969, 1974, 2069, 2069, 2071, 2079, 2079, 2081, 2086, 2087,
- 2088, 2090, 2090, 2100, 2104, 2109, 2113, 2117, 2121, 2125,
- 2129, 2133, 2137, 2141, 2166, 2170, 2184, 2188, 2194, 2194,
- 2200, 2205, 2209, 2218, 2229, 2234, 2246, 2259, 2263, 2267,
- 2272, 2281, 2300, 2309, 2365, 2369, 2376, 2387, 2400, 2409,
- 2418, 2428, 2432, 2439, 2439, 2441, 2445, 2450, 2468, 2483,
- 2497, 2510, 2518, 2526, 2534, 2540, 2560, 2583, 2589, 2595,
- 2601, 2616, 2675, 2682, 2685, 2690, 2694, 2701, 2706, 2712,
- 2717, 2723, 2731, 2743, 2758
+ 0, 1128, 1128, 1129, 1137, 1138, 1148, 1148, 1148, 1148,
+ 1148, 1148, 1148, 1149, 1149, 1149, 1150, 1150, 1150, 1150,
+ 1150, 1150, 1152, 1152, 1156, 1156, 1156, 1156, 1157, 1157,
+ 1157, 1157, 1158, 1158, 1159, 1159, 1162, 1166, 1171, 1172,
+ 1173, 1174, 1175, 1176, 1177, 1178, 1180, 1181, 1182, 1183,
+ 1184, 1185, 1186, 1187, 1196, 1197, 1203, 1204, 1212, 1220,
+ 1221, 1226, 1227, 1228, 1233, 1247, 1247, 1248, 1248, 1250,
+ 1260, 1260, 1260, 1260, 1260, 1260, 1260, 1261, 1261, 1261,
+ 1261, 1261, 1261, 1262, 1266, 1270, 1278, 1286, 1299, 1304,
+ 1316, 1326, 1330, 1341, 1346, 1352, 1353, 1357, 1361, 1372,
+ 1398, 1412, 1442, 1468, 1489, 1502, 1512, 1517, 1578, 1585,
+ 1594, 1600, 1606, 1610, 1614, 1622, 1633, 1665, 1673, 1697,
+ 1708, 1714, 1722, 1728, 1734, 1743, 1747, 1755, 1755, 1765,
+ 1773, 1778, 1782, 1786, 1790, 1805, 1827, 1830, 1833, 1833,
+ 1841, 1841, 1849, 1849, 1857, 1857, 1866, 1869, 1872, 1876,
+ 1889, 1890, 1892, 1896, 1905, 1910, 1916, 1918, 1923, 1928,
+ 1937, 1937, 1938, 1938, 1940, 1947, 1953, 1960, 1964, 1970,
+ 1975, 1980, 2075, 2075, 2077, 2085, 2085, 2087, 2092, 2093,
+ 2094, 2096, 2096, 2106, 2110, 2115, 2119, 2123, 2127, 2131,
+ 2135, 2139, 2143, 2147, 2172, 2176, 2190, 2194, 2200, 2200,
+ 2206, 2211, 2215, 2224, 2235, 2240, 2252, 2265, 2269, 2273,
+ 2278, 2287, 2306, 2315, 2371, 2375, 2382, 2393, 2406, 2415,
+ 2424, 2434, 2438, 2445, 2445, 2447, 2451, 2456, 2474, 2489,
+ 2503, 2516, 2524, 2532, 2540, 2546, 2566, 2589, 2595, 2601,
+ 2607, 2622, 2681, 2688, 2691, 2696, 2700, 2707, 2712, 2718,
+ 2723, 2729, 2737, 2749, 2764
};
#endif
@@ -2975,7 +2981,7 @@
switch (yyn)
{
case 3:
-#line 1123 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1129 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[0].UIntVal) > (uint32_t)INT32_MAX) // Outside of my range!
GEN_ERROR("Value too large for type!");
@@ -2985,7 +2991,7 @@
break;
case 5:
-#line 1132 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1138 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[0].UInt64Val) > (uint64_t)INT64_MAX) // Outside of my range!
GEN_ERROR("Value too large for type!");
@@ -2995,7 +3001,7 @@
break;
case 36:
-#line 1156 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1162 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.StrVal) = (yyvsp[-1].StrVal);
CHECK_FOR_ERROR
@@ -3003,7 +3009,7 @@
break;
case 37:
-#line 1160 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1166 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.StrVal) = 0;
CHECK_FOR_ERROR
@@ -3011,82 +3017,82 @@
break;
case 38:
-#line 1165 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1171 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
break;
case 39:
-#line 1166 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1172 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;}
break;
case 40:
-#line 1167 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1173 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
break;
case 41:
-#line 1168 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1174 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::AppendingLinkage; ;}
break;
case 42:
-#line 1169 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1175 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
break;
case 43:
-#line 1170 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1176 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;}
break;
case 44:
-#line 1171 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1177 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
break;
case 45:
-#line 1172 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1178 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
break;
case 46:
-#line 1174 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1180 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::C; ;}
break;
case 47:
-#line 1175 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1181 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::C; ;}
break;
case 48:
-#line 1176 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1182 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::CSRet; ;}
break;
case 49:
-#line 1177 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1183 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::Fast; ;}
break;
case 50:
-#line 1178 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1184 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::Cold; ;}
break;
case 51:
-#line 1179 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1185 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::X86_StdCall; ;}
break;
case 52:
-#line 1180 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1186 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = CallingConv::X86_FastCall; ;}
break;
case 53:
-#line 1181 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1187 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((unsigned)(yyvsp[0].UInt64Val) != (yyvsp[0].UInt64Val))
GEN_ERROR("Calling conv too large!");
@@ -3096,12 +3102,12 @@
break;
case 54:
-#line 1190 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1196 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = 0; ;}
break;
case 55:
-#line 1191 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1197 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.UIntVal) = (yyvsp[0].UInt64Val);
if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
@@ -3111,12 +3117,12 @@
break;
case 56:
-#line 1197 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1203 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.UIntVal) = 0; ;}
break;
case 57:
-#line 1198 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1204 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.UIntVal) = (yyvsp[0].UInt64Val);
if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
@@ -3126,7 +3132,7 @@
break;
case 58:
-#line 1206 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1212 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
for (unsigned i = 0, e = strlen((yyvsp[0].StrVal)); i != e; ++i)
if ((yyvsp[0].StrVal)[i] == '"' || (yyvsp[0].StrVal)[i] == '\\')
@@ -3137,27 +3143,27 @@
break;
case 59:
-#line 1214 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1220 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.StrVal) = 0; ;}
break;
case 60:
-#line 1215 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1221 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.StrVal) = (yyvsp[0].StrVal); ;}
break;
case 61:
-#line 1220 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1226 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{;}
break;
case 62:
-#line 1221 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1227 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{;}
break;
case 63:
-#line 1222 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1228 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV->setSection((yyvsp[0].StrVal));
free((yyvsp[0].StrVal));
@@ -3166,7 +3172,7 @@
break;
case 64:
-#line 1227 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1233 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[0].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[0].UInt64Val)))
GEN_ERROR("Alignment must be a power of two!");
@@ -3176,17 +3182,17 @@
break;
case 66:
-#line 1241 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1247 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); ;}
break;
case 68:
-#line 1242 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1248 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); ;}
break;
case 69:
-#line 1244 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1250 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription());
@@ -3196,7 +3202,7 @@
break;
case 83:
-#line 1256 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1262 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeVal) = new PATypeHolder(OpaqueType::get());
CHECK_FOR_ERROR
@@ -3204,7 +3210,7 @@
break;
case 84:
-#line 1260 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1266 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType));
CHECK_FOR_ERROR
@@ -3212,7 +3218,7 @@
break;
case 85:
-#line 1264 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1270 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Named types are also simple types...
const Type* tmp = getTypeVal((yyvsp[0].ValIDVal));
CHECK_FOR_ERROR
@@ -3221,7 +3227,7 @@
break;
case 86:
-#line 1272 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1278 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Type UpReference
if ((yyvsp[0].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range!");
OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder
@@ -3233,7 +3239,7 @@
break;
case 87:
-#line 1280 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1286 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Function derived type?
std::vector<const Type*> Params;
for (std::list<llvm::PATypeHolder>::iterator I = (yyvsp[-1].TypeList)->begin(),
@@ -3250,7 +3256,7 @@
break;
case 88:
-#line 1293 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1299 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Sized array type?
(yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[-1].TypeVal), (unsigned)(yyvsp[-3].UInt64Val))));
delete (yyvsp[-1].TypeVal);
@@ -3259,7 +3265,7 @@
break;
case 89:
-#line 1298 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1304 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Packed array type?
const llvm::Type* ElemTy = (yyvsp[-1].TypeVal)->get();
if ((unsigned)(yyvsp[-3].UInt64Val) != (yyvsp[-3].UInt64Val))
@@ -3275,7 +3281,7 @@
break;
case 90:
-#line 1310 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1316 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Structure type?
std::vector<const Type*> Elements;
for (std::list<llvm::PATypeHolder>::iterator I = (yyvsp[-1].TypeList)->begin(),
@@ -3289,7 +3295,7 @@
break;
case 91:
-#line 1320 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1326 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Empty structure type?
(yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector<const Type*>()));
CHECK_FOR_ERROR
@@ -3297,7 +3303,7 @@
break;
case 92:
-#line 1324 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1330 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Pointer type?
if (*(yyvsp[-1].TypeVal) == Type::LabelTy)
GEN_ERROR("Cannot form a pointer to a basic block");
@@ -3308,7 +3314,7 @@
break;
case 93:
-#line 1335 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1341 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeList) = new std::list<PATypeHolder>();
(yyval.TypeList)->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal);
@@ -3317,7 +3323,7 @@
break;
case 94:
-#line 1340 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1346 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal);
CHECK_FOR_ERROR
@@ -3325,7 +3331,7 @@
break;
case 96:
-#line 1347 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1353 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(Type::VoidTy);
CHECK_FOR_ERROR
@@ -3333,7 +3339,7 @@
break;
case 97:
-#line 1351 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1357 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
((yyval.TypeList) = new std::list<PATypeHolder>())->push_back(Type::VoidTy);
CHECK_FOR_ERROR
@@ -3341,7 +3347,7 @@
break;
case 98:
-#line 1355 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1361 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeList) = new std::list<PATypeHolder>();
CHECK_FOR_ERROR
@@ -3349,7 +3355,7 @@
break;
case 99:
-#line 1366 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1372 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Nonempty unsized arr
const ArrayType *ATy = dyn_cast<ArrayType>((yyvsp[-3].TypeVal)->get());
if (ATy == 0)
@@ -3379,7 +3385,7 @@
break;
case 100:
-#line 1392 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1398 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
const ArrayType *ATy = dyn_cast<ArrayType>((yyvsp[-2].TypeVal)->get());
if (ATy == 0)
@@ -3397,7 +3403,7 @@
break;
case 101:
-#line 1406 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1412 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
const ArrayType *ATy = dyn_cast<ArrayType>((yyvsp[-2].TypeVal)->get());
if (ATy == 0)
@@ -3431,7 +3437,7 @@
break;
case 102:
-#line 1436 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1442 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Nonempty unsized arr
const PackedType *PTy = dyn_cast<PackedType>((yyvsp[-3].TypeVal)->get());
if (PTy == 0)
@@ -3461,7 +3467,7 @@
break;
case 103:
-#line 1462 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1468 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
const StructType *STy = dyn_cast<StructType>((yyvsp[-3].TypeVal)->get());
if (STy == 0)
@@ -3486,7 +3492,7 @@
break;
case 104:
-#line 1483 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1489 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
const StructType *STy = dyn_cast<StructType>((yyvsp[-2].TypeVal)->get());
if (STy == 0)
@@ -3503,7 +3509,7 @@
break;
case 105:
-#line 1496 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1502 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
const PointerType *PTy = dyn_cast<PointerType>((yyvsp[-1].TypeVal)->get());
if (PTy == 0)
@@ -3517,7 +3523,7 @@
break;
case 106:
-#line 1506 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1512 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ConstVal) = UndefValue::get((yyvsp[-1].TypeVal)->get());
delete (yyvsp[-1].TypeVal);
@@ -3526,7 +3532,7 @@
break;
case 107:
-#line 1511 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1517 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
const PointerType *Ty = dyn_cast<PointerType>((yyvsp[-1].TypeVal)->get());
if (Ty == 0)
@@ -3591,7 +3597,7 @@
break;
case 108:
-#line 1572 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1578 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[-1].TypeVal)->get() != (yyvsp[0].ConstVal)->getType())
GEN_ERROR("Mismatched types for constant expression!");
@@ -3602,7 +3608,7 @@
break;
case 109:
-#line 1579 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1585 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
const Type *Ty = (yyvsp[-1].TypeVal)->get();
if (isa<FunctionType>(Ty) || Ty == Type::LabelTy || isa<OpaqueType>(Ty))
@@ -3614,7 +3620,7 @@
break;
case 110:
-#line 1588 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1594 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // integral constants
if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val)))
GEN_ERROR("Constant value doesn't fit in type!");
@@ -3624,7 +3630,7 @@
break;
case 111:
-#line 1594 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1600 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // integral constants
if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val)))
GEN_ERROR("Constant value doesn't fit in type!");
@@ -3634,7 +3640,7 @@
break;
case 112:
-#line 1600 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1606 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Boolean constants
(yyval.ConstVal) = ConstantBool::getTrue();
CHECK_FOR_ERROR
@@ -3642,7 +3648,7 @@
break;
case 113:
-#line 1604 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1610 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Boolean constants
(yyval.ConstVal) = ConstantBool::getFalse();
CHECK_FOR_ERROR
@@ -3650,7 +3656,7 @@
break;
case 114:
-#line 1608 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1614 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Float & Double constants
if (!ConstantFP::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].FPVal)))
GEN_ERROR("Floating point constant invalid for type!!");
@@ -3660,7 +3666,7 @@
break;
case 115:
-#line 1616 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1622 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!(yyvsp[-3].ConstVal)->getType()->isFirstClassType())
GEN_ERROR("cast constant expression from a non-primitive type: '" +
@@ -3675,7 +3681,7 @@
break;
case 116:
-#line 1627 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1633 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!isa<PointerType>((yyvsp[-2].ConstVal)->getType()))
GEN_ERROR("GetElementPtr requires a pointer operand!");
@@ -3711,7 +3717,7 @@
break;
case 117:
-#line 1659 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1665 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[-5].ConstVal)->getType() != Type::BoolTy)
GEN_ERROR("Select condition must be of boolean type!");
@@ -3723,7 +3729,7 @@
break;
case 118:
-#line 1667 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1673 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType())
GEN_ERROR("Binary operator types must match!");
@@ -3751,7 +3757,7 @@
break;
case 119:
-#line 1691 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1697 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType())
GEN_ERROR("Logical operator types must match!");
@@ -3766,7 +3772,7 @@
break;
case 120:
-#line 1702 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1708 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType())
GEN_ERROR("setcc operand types must match!");
@@ -3776,7 +3782,7 @@
break;
case 121:
-#line 1708 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1714 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[-1].ConstVal)->getType() != Type::UByteTy)
GEN_ERROR("Shift count for shift constant must be unsigned byte!");
@@ -3788,7 +3794,7 @@
break;
case 122:
-#line 1716 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1722 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)))
GEN_ERROR("Invalid extractelement operands!");
@@ -3798,7 +3804,7 @@
break;
case 123:
-#line 1722 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1728 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!InsertElementInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)))
GEN_ERROR("Invalid insertelement operands!");
@@ -3808,7 +3814,7 @@
break;
case 124:
-#line 1728 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1734 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!ShuffleVectorInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)))
GEN_ERROR("Invalid shufflevector operands!");
@@ -3818,7 +3824,7 @@
break;
case 125:
-#line 1737 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1743 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal));
CHECK_FOR_ERROR
@@ -3826,7 +3832,7 @@
break;
case 126:
-#line 1741 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1747 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ConstVector) = new std::vector<Constant*>();
(yyval.ConstVector)->push_back((yyvsp[0].ConstVal));
@@ -3835,17 +3841,17 @@
break;
case 127:
-#line 1749 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1755 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.BoolVal) = false; ;}
break;
case 128:
-#line 1749 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1755 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.BoolVal) = true; ;}
break;
case 129:
-#line 1759 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1765 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ModuleVal) = ParserResult = (yyvsp[0].ModuleVal);
CurModule.ModuleDone();
@@ -3854,7 +3860,7 @@
break;
case 130:
-#line 1767 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1773 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ModuleVal) = (yyvsp[-1].ModuleVal);
CurFun.FunctionDone();
@@ -3863,7 +3869,7 @@
break;
case 131:
-#line 1772 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1778 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ModuleVal) = (yyvsp[-1].ModuleVal);
CHECK_FOR_ERROR
@@ -3871,7 +3877,7 @@
break;
case 132:
-#line 1776 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1782 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ModuleVal) = (yyvsp[-3].ModuleVal);
CHECK_FOR_ERROR
@@ -3879,7 +3885,7 @@
break;
case 133:
-#line 1780 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1786 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ModuleVal) = (yyvsp[-1].ModuleVal);
CHECK_FOR_ERROR
@@ -3887,7 +3893,7 @@
break;
case 134:
-#line 1784 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1790 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ModuleVal) = CurModule.CurrentModule;
// Emit an error if there are any unresolved types left.
@@ -3904,7 +3910,7 @@
break;
case 135:
-#line 1799 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1805 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Eagerly resolve types. This is not an optimization, this is a
// requirement that is due to the fact that we could have this:
@@ -3930,21 +3936,21 @@
break;
case 136:
-#line 1821 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1827 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Function prototypes can be in const pool
CHECK_FOR_ERROR
;}
break;
case 137:
-#line 1824 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1830 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Asm blocks can be in the const pool
CHECK_FOR_ERROR
;}
break;
case 138:
-#line 1827 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1833 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[0].ConstVal) == 0)
GEN_ERROR("Global value initializer is not a constant!");
@@ -3954,14 +3960,14 @@
break;
case 139:
-#line 1832 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1838 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV = 0;
;}
break;
case 140:
-#line 1835 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1841 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0);
CHECK_FOR_ERROR
@@ -3970,7 +3976,7 @@
break;
case 141:
-#line 1839 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1845 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV = 0;
CHECK_FOR_ERROR
@@ -3978,7 +3984,7 @@
break;
case 142:
-#line 1843 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1849 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::DLLImportLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0);
CHECK_FOR_ERROR
@@ -3987,7 +3993,7 @@
break;
case 143:
-#line 1847 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1853 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV = 0;
CHECK_FOR_ERROR
@@ -3995,7 +4001,7 @@
break;
case 144:
-#line 1851 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1857 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV =
ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalWeakLinkage, (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0);
@@ -4005,7 +4011,7 @@
break;
case 145:
-#line 1856 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1862 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV = 0;
CHECK_FOR_ERROR
@@ -4013,27 +4019,27 @@
break;
case 146:
-#line 1860 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1866 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;}
break;
case 147:
-#line 1863 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1869 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;}
break;
case 148:
-#line 1866 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1872 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
;}
break;
case 149:
-#line 1870 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1876 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm();
char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true);
@@ -4049,17 +4055,17 @@
break;
case 150:
-#line 1883 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1889 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Endianness) = Module::BigEndian; ;}
break;
case 151:
-#line 1884 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1890 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.Endianness) = Module::LittleEndian; ;}
break;
case 152:
-#line 1886 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1892 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->setEndianness((yyvsp[0].Endianness));
CHECK_FOR_ERROR
@@ -4067,7 +4073,7 @@
break;
case 153:
-#line 1890 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1896 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[0].UInt64Val) == 32)
CurModule.CurrentModule->setPointerSize(Module::Pointer32);
@@ -4080,7 +4086,7 @@
break;
case 154:
-#line 1899 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1905 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal));
free((yyvsp[0].StrVal));
@@ -4089,7 +4095,7 @@
break;
case 155:
-#line 1904 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1910 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal));
free((yyvsp[0].StrVal));
@@ -4098,7 +4104,7 @@
break;
case 157:
-#line 1912 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1918 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal));
free((yyvsp[0].StrVal));
@@ -4107,7 +4113,7 @@
break;
case 158:
-#line 1917 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1923 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal));
free((yyvsp[0].StrVal));
@@ -4116,19 +4122,19 @@
break;
case 159:
-#line 1922 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1928 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;}
break;
case 163:
-#line 1932 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1938 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.StrVal) = 0; ;}
break;
case 164:
-#line 1934 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1940 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (*(yyvsp[-1].TypeVal) == Type::VoidTy)
GEN_ERROR("void typed arguments are invalid!");
@@ -4138,7 +4144,7 @@
break;
case 165:
-#line 1941 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1947 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ArgList) = (yyvsp[-2].ArgList);
(yyvsp[-2].ArgList)->push_back(*(yyvsp[0].ArgVal));
@@ -4148,7 +4154,7 @@
break;
case 166:
-#line 1947 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1953 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ArgList) = new std::vector<std::pair<PATypeHolder*,char*> >();
(yyval.ArgList)->push_back(*(yyvsp[0].ArgVal));
@@ -4158,7 +4164,7 @@
break;
case 167:
-#line 1954 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1960 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ArgList) = (yyvsp[0].ArgList);
CHECK_FOR_ERROR
@@ -4166,7 +4172,7 @@
break;
case 168:
-#line 1958 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1964 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ArgList) = (yyvsp[-2].ArgList);
(yyval.ArgList)->push_back(std::pair<PATypeHolder*,
@@ -4176,7 +4182,7 @@
break;
case 169:
-#line 1964 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1970 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ArgList) = new std::vector<std::pair<PATypeHolder*,char*> >();
(yyval.ArgList)->push_back(std::make_pair(new PATypeHolder(Type::VoidTy), (char*)0));
@@ -4185,7 +4191,7 @@
break;
case 170:
-#line 1969 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1975 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ArgList) = 0;
CHECK_FOR_ERROR
@@ -4193,7 +4199,7 @@
break;
case 171:
-#line 1975 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1981 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
UnEscapeLexed((yyvsp[-5].StrVal));
std::string FunctionName((yyvsp[-5].StrVal));
@@ -4290,7 +4296,7 @@
break;
case 174:
-#line 2071 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2077 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.FunctionVal) = CurFun.CurrentFunction;
@@ -4301,7 +4307,7 @@
break;
case 177:
-#line 2081 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2087 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.FunctionVal) = (yyvsp[-1].FunctionVal);
CHECK_FOR_ERROR
@@ -4309,22 +4315,22 @@
break;
case 179:
-#line 2087 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2093 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ CurFun.Linkage = GlobalValue::DLLImportLinkage ;}
break;
case 180:
-#line 2088 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2094 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ CurFun.Linkage = GlobalValue::DLLImportLinkage ;}
break;
case 181:
-#line 2090 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2096 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ CurFun.isDeclare = true; ;}
break;
case 182:
-#line 2090 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2096 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.FunctionVal) = CurFun.CurrentFunction;
CurFun.FunctionDone();
@@ -4333,7 +4339,7 @@
break;
case 183:
-#line 2100 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2106 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = false;
CHECK_FOR_ERROR
@@ -4341,7 +4347,7 @@
break;
case 184:
-#line 2104 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2110 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = true;
CHECK_FOR_ERROR
@@ -4349,7 +4355,7 @@
break;
case 185:
-#line 2109 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2115 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // A reference to a direct constant
(yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val));
CHECK_FOR_ERROR
@@ -4357,7 +4363,7 @@
break;
case 186:
-#line 2113 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2119 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val));
CHECK_FOR_ERROR
@@ -4365,7 +4371,7 @@
break;
case 187:
-#line 2117 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2123 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Perhaps it's an FP constant?
(yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal));
CHECK_FOR_ERROR
@@ -4373,7 +4379,7 @@
break;
case 188:
-#line 2121 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2127 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::create(ConstantBool::getTrue());
CHECK_FOR_ERROR
@@ -4381,7 +4387,7 @@
break;
case 189:
-#line 2125 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2131 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::create(ConstantBool::getFalse());
CHECK_FOR_ERROR
@@ -4389,7 +4395,7 @@
break;
case 190:
-#line 2129 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2135 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::createNull();
CHECK_FOR_ERROR
@@ -4397,7 +4403,7 @@
break;
case 191:
-#line 2133 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2139 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::createUndef();
CHECK_FOR_ERROR
@@ -4405,7 +4411,7 @@
break;
case 192:
-#line 2137 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2143 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // A vector zero constant.
(yyval.ValIDVal) = ValID::createZeroInit();
CHECK_FOR_ERROR
@@ -4413,7 +4419,7 @@
break;
case 193:
-#line 2141 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2147 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Nonempty unsized packed vector
const Type *ETy = (*(yyvsp[-1].ConstVector))[0]->getType();
int NumElements = (yyvsp[-1].ConstVector)->size();
@@ -4442,7 +4448,7 @@
break;
case 194:
-#line 2166 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2172 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal));
CHECK_FOR_ERROR
@@ -4450,7 +4456,7 @@
break;
case 195:
-#line 2170 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2176 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
char *End = UnEscapeLexed((yyvsp[-2].StrVal), true);
std::string AsmStr = std::string((yyvsp[-2].StrVal), End);
@@ -4464,7 +4470,7 @@
break;
case 196:
-#line 2184 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2190 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Is it an integer reference...?
(yyval.ValIDVal) = ValID::create((yyvsp[0].SIntVal));
CHECK_FOR_ERROR
@@ -4472,7 +4478,7 @@
break;
case 197:
-#line 2188 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2194 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Is it a named reference...?
(yyval.ValIDVal) = ValID::create((yyvsp[0].StrVal));
CHECK_FOR_ERROR
@@ -4480,7 +4486,7 @@
break;
case 200:
-#line 2200 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2206 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValueVal) = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal)); delete (yyvsp[-1].TypeVal);
CHECK_FOR_ERROR
@@ -4488,7 +4494,7 @@
break;
case 201:
-#line 2205 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2211 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.FunctionVal) = (yyvsp[-1].FunctionVal);
CHECK_FOR_ERROR
@@ -4496,7 +4502,7 @@
break;
case 202:
-#line 2209 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2215 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Do not allow functions with 0 basic blocks
(yyval.FunctionVal) = (yyvsp[-1].FunctionVal);
CHECK_FOR_ERROR
@@ -4504,7 +4510,7 @@
break;
case 203:
-#line 2218 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2224 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
setValueName((yyvsp[0].TermInstVal), (yyvsp[-1].StrVal));
CHECK_FOR_ERROR
@@ -4518,7 +4524,7 @@
break;
case 204:
-#line 2229 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2235 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyvsp[-1].BasicBlockVal)->getInstList().push_back((yyvsp[0].InstVal));
(yyval.BasicBlockVal) = (yyvsp[-1].BasicBlockVal);
@@ -4527,7 +4533,7 @@
break;
case 205:
-#line 2234 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2240 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true);
CHECK_FOR_ERROR
@@ -4543,7 +4549,7 @@
break;
case 206:
-#line 2246 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2252 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((yyvsp[0].StrVal)), true);
CHECK_FOR_ERROR
@@ -4559,7 +4565,7 @@
break;
case 207:
-#line 2259 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2265 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Return with a result...
(yyval.TermInstVal) = new ReturnInst((yyvsp[0].ValueVal));
CHECK_FOR_ERROR
@@ -4567,7 +4573,7 @@
break;
case 208:
-#line 2263 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2269 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Return with no result...
(yyval.TermInstVal) = new ReturnInst();
CHECK_FOR_ERROR
@@ -4575,7 +4581,7 @@
break;
case 209:
-#line 2267 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2273 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Unconditional Branch...
BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal));
CHECK_FOR_ERROR
@@ -4584,7 +4590,7 @@
break;
case 210:
-#line 2272 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2278 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
BasicBlock* tmpBBA = getBBVal((yyvsp[-3].ValIDVal));
CHECK_FOR_ERROR
@@ -4597,7 +4603,7 @@
break;
case 211:
-#line 2281 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2287 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
Value* tmpVal = getVal((yyvsp[-7].PrimType), (yyvsp[-6].ValIDVal));
CHECK_FOR_ERROR
@@ -4620,7 +4626,7 @@
break;
case 212:
-#line 2300 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2306 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
Value* tmpVal = getVal((yyvsp[-6].PrimType), (yyvsp[-5].ValIDVal));
CHECK_FOR_ERROR
@@ -4633,7 +4639,7 @@
break;
case 213:
-#line 2310 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2316 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
const PointerType *PFTy;
const FunctionType *Ty;
@@ -4692,7 +4698,7 @@
break;
case 214:
-#line 2365 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2371 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TermInstVal) = new UnwindInst();
CHECK_FOR_ERROR
@@ -4700,7 +4706,7 @@
break;
case 215:
-#line 2369 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2375 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TermInstVal) = new UnreachableInst();
CHECK_FOR_ERROR
@@ -4708,7 +4714,7 @@
break;
case 216:
-#line 2376 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2382 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.JumpTable) = (yyvsp[-5].JumpTable);
Constant *V = cast<Constant>(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal)));
@@ -4723,7 +4729,7 @@
break;
case 217:
-#line 2387 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2393 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.JumpTable) = new std::vector<std::pair<Constant*, BasicBlock*> >();
Constant *V = cast<Constant>(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal)));
@@ -4739,7 +4745,7 @@
break;
case 218:
-#line 2400 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2406 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Is this definition named?? if so, assign the name...
setValueName((yyvsp[0].InstVal), (yyvsp[-1].StrVal));
@@ -4751,7 +4757,7 @@
break;
case 219:
-#line 2409 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2415 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Used for PHI nodes
(yyval.PHIList) = new std::list<std::pair<Value*, BasicBlock*> >();
Value* tmpVal = getVal(*(yyvsp[-5].TypeVal), (yyvsp[-3].ValIDVal));
@@ -4764,7 +4770,7 @@
break;
case 220:
-#line 2418 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2424 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.PHIList) = (yyvsp[-6].PHIList);
Value* tmpVal = getVal((yyvsp[-6].PHIList)->front().first->getType(), (yyvsp[-3].ValIDVal));
@@ -4776,7 +4782,7 @@
break;
case 221:
-#line 2428 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2434 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Used for call statements, and memory insts...
(yyval.ValueList) = new std::vector<Value*>();
(yyval.ValueList)->push_back((yyvsp[0].ValueVal));
@@ -4784,7 +4790,7 @@
break;
case 222:
-#line 2432 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2438 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValueList) = (yyvsp[-2].ValueList);
(yyvsp[-2].ValueList)->push_back((yyvsp[0].ValueVal));
@@ -4793,12 +4799,12 @@
break;
case 224:
-#line 2439 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2445 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{ (yyval.ValueList) = 0; ;}
break;
case 225:
-#line 2441 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2447 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = true;
CHECK_FOR_ERROR
@@ -4806,7 +4812,7 @@
break;
case 226:
-#line 2445 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2451 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = false;
CHECK_FOR_ERROR
@@ -4814,7 +4820,7 @@
break;
case 227:
-#line 2450 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2456 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!(*(yyvsp[-3].TypeVal))->isInteger() && !(*(yyvsp[-3].TypeVal))->isFloatingPoint() &&
!isa<PackedType>((*(yyvsp[-3].TypeVal)).get()))
@@ -4836,7 +4842,7 @@
break;
case 228:
-#line 2468 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2474 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!(*(yyvsp[-3].TypeVal))->isIntegral()) {
if (!isa<PackedType>((yyvsp[-3].TypeVal)->get()) ||
@@ -4855,7 +4861,7 @@
break;
case 229:
-#line 2483 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2489 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if(isa<PackedType>((*(yyvsp[-3].TypeVal)).get())) {
GEN_ERROR(
@@ -4873,7 +4879,7 @@
break;
case 230:
-#line 2497 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2503 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
std::cerr << "WARNING: Use of eliminated 'not' instruction:"
<< " Replacing with 'xor'.\n";
@@ -4890,7 +4896,7 @@
break;
case 231:
-#line 2510 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2516 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[0].ValueVal)->getType() != Type::UByteTy)
GEN_ERROR("Shift amount must be ubyte!");
@@ -4902,7 +4908,7 @@
break;
case 232:
-#line 2518 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2524 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!(yyvsp[0].TypeVal)->get()->isFirstClassType())
GEN_ERROR("cast instruction to a non-primitive type: '" +
@@ -4914,7 +4920,7 @@
break;
case 233:
-#line 2526 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2532 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((yyvsp[-4].ValueVal)->getType() != Type::BoolTy)
GEN_ERROR("select condition must be boolean!");
@@ -4926,7 +4932,7 @@
break;
case 234:
-#line 2534 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2540 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
NewVarArgs = true;
(yyval.InstVal) = new VAArgInst((yyvsp[-2].ValueVal), *(yyvsp[0].TypeVal));
@@ -4936,7 +4942,7 @@
break;
case 235:
-#line 2540 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2546 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
ObsoleteVarArgs = true;
const Type* ArgTy = (yyvsp[-2].ValueVal)->getType();
@@ -4960,7 +4966,7 @@
break;
case 236:
-#line 2560 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2566 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
ObsoleteVarArgs = true;
const Type* ArgTy = (yyvsp[-2].ValueVal)->getType();
@@ -4987,7 +4993,7 @@
break;
case 237:
-#line 2583 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2589 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!ExtractElementInst::isValidOperands((yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)))
GEN_ERROR("Invalid extractelement operands!");
@@ -4997,7 +5003,7 @@
break;
case 238:
-#line 2589 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2595 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!InsertElementInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)))
GEN_ERROR("Invalid insertelement operands!");
@@ -5007,7 +5013,7 @@
break;
case 239:
-#line 2595 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2601 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!ShuffleVectorInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)))
GEN_ERROR("Invalid shufflevector operands!");
@@ -5017,7 +5023,7 @@
break;
case 240:
-#line 2601 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2607 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
const Type *Ty = (yyvsp[0].PHIList)->front().first->getType();
if (!Ty->isFirstClassType())
@@ -5036,7 +5042,7 @@
break;
case 241:
-#line 2616 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2622 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
const PointerType *PFTy;
const FunctionType *Ty;
@@ -5099,7 +5105,7 @@
break;
case 242:
-#line 2675 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2681 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.InstVal) = (yyvsp[0].InstVal);
CHECK_FOR_ERROR
@@ -5107,7 +5113,7 @@
break;
case 243:
-#line 2682 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2688 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValueList) = (yyvsp[0].ValueList);
CHECK_FOR_ERROR
@@ -5115,7 +5121,7 @@
break;
case 244:
-#line 2685 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2691 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ValueList) = new std::vector<Value*>();
CHECK_FOR_ERROR
@@ -5123,7 +5129,7 @@
break;
case 245:
-#line 2690 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2696 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = true;
CHECK_FOR_ERROR
@@ -5131,7 +5137,7 @@
break;
case 246:
-#line 2694 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2700 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.BoolVal) = false;
CHECK_FOR_ERROR
@@ -5139,7 +5145,7 @@
break;
case 247:
-#line 2701 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2707 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.InstVal) = new MallocInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal));
delete (yyvsp[-1].TypeVal);
@@ -5148,7 +5154,7 @@
break;
case 248:
-#line 2706 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2712 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal));
CHECK_FOR_ERROR
@@ -5158,7 +5164,7 @@
break;
case 249:
-#line 2712 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2718 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.InstVal) = new AllocaInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal));
delete (yyvsp[-1].TypeVal);
@@ -5167,7 +5173,7 @@
break;
case 250:
-#line 2717 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2723 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal));
CHECK_FOR_ERROR
@@ -5177,7 +5183,7 @@
break;
case 251:
-#line 2723 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2729 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!isa<PointerType>((yyvsp[0].ValueVal)->getType()))
GEN_ERROR("Trying to free nonpointer type " +
@@ -5188,7 +5194,7 @@
break;
case 252:
-#line 2731 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2737 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!isa<PointerType>((yyvsp[-1].TypeVal)->get()))
GEN_ERROR("Can't load from nonpointer type: " +
@@ -5204,7 +5210,7 @@
break;
case 253:
-#line 2743 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2749 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
const PointerType *PT = dyn_cast<PointerType>((yyvsp[-1].TypeVal)->get());
if (!PT)
@@ -5223,7 +5229,7 @@
break;
case 254:
-#line 2758 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2764 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!isa<PointerType>((yyvsp[-2].TypeVal)->get()))
GEN_ERROR("getelementptr insn requires pointer operand!");
@@ -5255,7 +5261,7 @@
}
/* Line 1126 of yacc.c. */
-#line 5259 "llvmAsmParser.tab.c"
+#line 5265 "llvmAsmParser.tab.c"
yyvsp -= yylen;
yyssp -= yylen;
@@ -5523,7 +5529,7 @@
}
-#line 2784 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2790 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
void llvm::GenerateError(const std::string &message, int LineNo) {
Index: llvm/lib/AsmParser/llvmAsmParser.h.cvs
diff -u llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.13.2.6 llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.13.2.7
--- llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.13.2.6 Sun Oct 22 03:59:00 2006
+++ llvm/lib/AsmParser/llvmAsmParser.h.cvs Mon Oct 23 01:25:19 2006
@@ -253,7 +253,7 @@
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 999 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1005 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
typedef union YYSTYPE {
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs
diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.18.2.6 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.18.2.7
--- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.18.2.6 Sun Oct 22 03:59:00 2006
+++ llvm/lib/AsmParser/llvmAsmParser.y.cvs Mon Oct 23 01:25:19 2006
@@ -813,7 +813,13 @@
return Ty;
}
-// This function is
+// This template function is used to obtain the correct opcode for an
+// instruction when an obsolete opcode is encountered. The OpcodeInfo template
+// keeps track of the opcode and the "obsolete" flag. These are generated by
+// the lexer and obsolete will be true when the lexer encounters the token for
+// an obsolete opcode. For example, "div" was replaced by [usf]div but we need
+// to maintain backwards compatibility for asm files that still have the "div"
+// instruction. This function handles converting div -> [usf]div appropriately.
template <class EnumKind>
static void sanitizeOpCode(OpcodeInfo<EnumKind> &OI, const PATypeHolder& Ty) {
if (OI.obsolete) {
More information about the llvm-commits
mailing list