#include "llvm/Instructions.h"
#include "llvm/Module.h"
#include "llvm/ValueSymbolTable.h"
+#include "llvm/AutoUpgrade.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/ADT/SmallVector.h"
return;
}
+ // Look for intrinsic functions and CallInst that need to be upgraded
+ for (Module::iterator FI = CurrentModule->begin(),
+ FE = CurrentModule->end(); FI != FE; )
+ UpgradeCallsToIntrinsic(FI++); // must be post-increment, as we remove
+
Values.clear(); // Clear out function local definitions
Types.clear();
CurrentModule = 0;
}
case ValID::ConstFPVal: // Is it a floating point const pool reference?
- if (!ConstantFP::isValueValidForType(Ty, D.ConstPoolFP)) {
+ if (!ConstantFP::isValueValidForType(Ty, *D.ConstPoolFP)) {
GenerateError("FP constant invalid for type");
return 0;
}
- return ConstantFP::get(Ty, D.ConstPoolFP);
+ // Lexer has no type info, so builds all float and double FP constants
+ // as double. Fix this here. Long double does not need this.
+ if (&D.ConstPoolFP->getSemantics() == &APFloat::IEEEdouble &&
+ Ty==Type::FloatTy)
+ D.ConstPoolFP->convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven);
+ return ConstantFP::get(Ty, *D.ConstPoolFP);
case ValID::ConstNullVal: // Is it a null value?
if (!isa<PointerType>(Ty)) {
}
-#line 957 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 968 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
typedef union {
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
uint64_t UInt64Val;
int SIntVal;
unsigned UIntVal;
- double FPVal;
+ llvm::APFloat *FPVal;
bool BoolVal;
std::string *StrVal; // This memory must be deleted
#if YYDEBUG != 0
static const short yyrline[] = { 0,
- 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1117,
- 1117, 1117, 1117, 1117, 1117, 1118, 1118, 1118, 1118, 1118,
- 1118, 1118, 1119, 1119, 1119, 1119, 1119, 1122, 1122, 1123,
- 1123, 1124, 1124, 1125, 1125, 1126, 1126, 1130, 1130, 1131,
- 1131, 1132, 1132, 1133, 1133, 1134, 1134, 1135, 1135, 1136,
- 1136, 1137, 1138, 1143, 1144, 1144, 1144, 1144, 1144, 1146,
- 1146, 1146, 1147, 1147, 1151, 1155, 1160, 1160, 1162, 1163,
- 1168, 1174, 1175, 1176, 1177, 1178, 1182, 1183, 1184, 1188,
- 1189, 1190, 1191, 1195, 1196, 1197, 1201, 1202, 1203, 1204,
- 1205, 1209, 1210, 1211, 1214, 1214, 1215, 1216, 1217, 1218,
- 1219, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235,
- 1238, 1239, 1244, 1245, 1246, 1247, 1250, 1251, 1258, 1258,
- 1265, 1265, 1274, 1282, 1282, 1288, 1288, 1290, 1295, 1308,
- 1308, 1308, 1308, 1308, 1308, 1308, 1311, 1315, 1319, 1326,
- 1331, 1339, 1369, 1400, 1405, 1417, 1427, 1431, 1441, 1448,
- 1455, 1462, 1467, 1472, 1479, 1480, 1487, 1494, 1502, 1508,
- 1520, 1548, 1564, 1591, 1619, 1645, 1665, 1691, 1711, 1723,
- 1730, 1796, 1806, 1816, 1822, 1832, 1838, 1848, 1853, 1858,
- 1866, 1878, 1900, 1908, 1914, 1925, 1930, 1935, 1941, 1947,
- 1956, 1960, 1968, 1968, 1971, 1971, 1974, 1985, 2006, 2011,
- 2019, 2020, 2024, 2024, 2028, 2028, 2031, 2034, 2058, 2069,
- 2076, 2079, 2085, 2088, 2095, 2099, 2118, 2121, 2127, 2137,
- 2141, 2146, 2148, 2153, 2158, 2167, 2177, 2188, 2192, 2201,
- 2210, 2215, 2336, 2336, 2338, 2347, 2347, 2349, 2354, 2366,
- 2370, 2375, 2379, 2383, 2387, 2391, 2395, 2399, 2403, 2407,
- 2432, 2436, 2446, 2450, 2454, 2459, 2466, 2466, 2472, 2481,
- 2485, 2494, 2503, 2512, 2516, 2523, 2527, 2531, 2536, 2546,
- 2565, 2574, 2654, 2658, 2665, 2676, 2689, 2699, 2710, 2720,
- 2729, 2738, 2741, 2742, 2749, 2753, 2758, 2779, 2796, 2810,
- 2824, 2836, 2844, 2851, 2857, 2863, 2869, 2884, 2969, 2974,
- 2978, 2985, 2992, 3000, 3007, 3015, 3023, 3037, 3054
+ 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1127, 1128,
+ 1128, 1128, 1128, 1128, 1128, 1129, 1129, 1129, 1129, 1129,
+ 1129, 1129, 1130, 1130, 1130, 1130, 1130, 1133, 1133, 1134,
+ 1134, 1135, 1135, 1136, 1136, 1137, 1137, 1141, 1141, 1142,
+ 1142, 1143, 1143, 1144, 1144, 1145, 1145, 1146, 1146, 1147,
+ 1147, 1148, 1149, 1154, 1155, 1155, 1155, 1155, 1155, 1157,
+ 1157, 1157, 1158, 1158, 1162, 1166, 1171, 1171, 1173, 1174,
+ 1179, 1185, 1186, 1187, 1188, 1189, 1193, 1194, 1195, 1199,
+ 1200, 1201, 1202, 1206, 1207, 1208, 1212, 1213, 1214, 1215,
+ 1216, 1220, 1221, 1222, 1225, 1225, 1226, 1227, 1228, 1229,
+ 1230, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246,
+ 1249, 1250, 1255, 1256, 1257, 1258, 1261, 1262, 1269, 1269,
+ 1276, 1276, 1285, 1293, 1293, 1299, 1299, 1301, 1306, 1319,
+ 1319, 1319, 1319, 1319, 1319, 1319, 1322, 1326, 1330, 1337,
+ 1342, 1350, 1380, 1411, 1416, 1428, 1438, 1442, 1452, 1459,
+ 1466, 1473, 1478, 1483, 1490, 1491, 1498, 1505, 1513, 1519,
+ 1531, 1559, 1575, 1602, 1630, 1656, 1676, 1702, 1722, 1734,
+ 1741, 1807, 1817, 1827, 1833, 1843, 1849, 1859, 1864, 1869,
+ 1882, 1894, 1916, 1924, 1930, 1941, 1946, 1951, 1957, 1963,
+ 1972, 1976, 1984, 1984, 1987, 1987, 1990, 2002, 2023, 2028,
+ 2036, 2037, 2041, 2041, 2045, 2045, 2048, 2051, 2075, 2086,
+ 2093, 2096, 2102, 2105, 2112, 2116, 2156, 2159, 2165, 2175,
+ 2179, 2184, 2186, 2191, 2196, 2205, 2215, 2226, 2230, 2239,
+ 2248, 2253, 2374, 2374, 2376, 2385, 2385, 2387, 2392, 2404,
+ 2408, 2413, 2417, 2421, 2425, 2429, 2433, 2437, 2441, 2445,
+ 2470, 2474, 2484, 2488, 2492, 2497, 2504, 2504, 2510, 2519,
+ 2523, 2532, 2541, 2550, 2554, 2561, 2565, 2569, 2574, 2584,
+ 2603, 2612, 2692, 2696, 2703, 2714, 2727, 2737, 2748, 2758,
+ 2767, 2776, 2779, 2780, 2787, 2791, 2796, 2817, 2834, 2848,
+ 2862, 2874, 2882, 2889, 2895, 2901, 2907, 2922, 3007, 3012,
+ 3016, 3023, 3030, 3038, 3045, 3053, 3061, 3075, 3092
};
#endif
switch (yyn) {
case 28:
-#line 1122 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1133 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.IPredicate = ICmpInst::ICMP_EQ; ;
break;}
case 29:
-#line 1122 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1133 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.IPredicate = ICmpInst::ICMP_NE; ;
break;}
case 30:
-#line 1123 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1134 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.IPredicate = ICmpInst::ICMP_SLT; ;
break;}
case 31:
-#line 1123 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1134 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.IPredicate = ICmpInst::ICMP_SGT; ;
break;}
case 32:
-#line 1124 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1135 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.IPredicate = ICmpInst::ICMP_SLE; ;
break;}
case 33:
-#line 1124 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1135 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.IPredicate = ICmpInst::ICMP_SGE; ;
break;}
case 34:
-#line 1125 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1136 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.IPredicate = ICmpInst::ICMP_ULT; ;
break;}
case 35:
-#line 1125 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1136 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.IPredicate = ICmpInst::ICMP_UGT; ;
break;}
case 36:
-#line 1126 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1137 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.IPredicate = ICmpInst::ICMP_ULE; ;
break;}
case 37:
-#line 1126 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1137 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.IPredicate = ICmpInst::ICMP_UGE; ;
break;}
case 38:
-#line 1130 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1141 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.FPredicate = FCmpInst::FCMP_OEQ; ;
break;}
case 39:
-#line 1130 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1141 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.FPredicate = FCmpInst::FCMP_ONE; ;
break;}
case 40:
-#line 1131 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1142 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.FPredicate = FCmpInst::FCMP_OLT; ;
break;}
case 41:
-#line 1131 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1142 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.FPredicate = FCmpInst::FCMP_OGT; ;
break;}
case 42:
-#line 1132 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1143 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.FPredicate = FCmpInst::FCMP_OLE; ;
break;}
case 43:
-#line 1132 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1143 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.FPredicate = FCmpInst::FCMP_OGE; ;
break;}
case 44:
-#line 1133 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1144 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.FPredicate = FCmpInst::FCMP_ORD; ;
break;}
case 45:
-#line 1133 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1144 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.FPredicate = FCmpInst::FCMP_UNO; ;
break;}
case 46:
-#line 1134 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1145 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.FPredicate = FCmpInst::FCMP_UEQ; ;
break;}
case 47:
-#line 1134 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1145 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.FPredicate = FCmpInst::FCMP_UNE; ;
break;}
case 48:
-#line 1135 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1146 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.FPredicate = FCmpInst::FCMP_ULT; ;
break;}
case 49:
-#line 1135 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1146 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.FPredicate = FCmpInst::FCMP_UGT; ;
break;}
case 50:
-#line 1136 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1147 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.FPredicate = FCmpInst::FCMP_ULE; ;
break;}
case 51:
-#line 1136 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1147 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.FPredicate = FCmpInst::FCMP_UGE; ;
break;}
case 52:
-#line 1137 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1148 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.FPredicate = FCmpInst::FCMP_TRUE; ;
break;}
case 53:
-#line 1138 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1149 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.FPredicate = FCmpInst::FCMP_FALSE; ;
break;}
case 64:
-#line 1147 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1158 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.StrVal = 0; ;
break;}
case 65:
-#line 1151 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1162 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.StrVal = yyvsp[-1].StrVal;
CHECK_FOR_ERROR
;
break;}
case 66:
-#line 1155 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1166 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.StrVal = 0;
CHECK_FOR_ERROR
;
break;}
case 70:
-#line 1163 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1174 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.StrVal = 0;
CHECK_FOR_ERROR
;
break;}
case 71:
-#line 1168 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1179 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.StrVal = yyvsp[-1].StrVal;
CHECK_FOR_ERROR
;
break;}
case 72:
-#line 1174 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1185 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::InternalLinkage; ;
break;}
case 73:
-#line 1175 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1186 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::WeakLinkage; ;
break;}
case 74:
-#line 1176 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1187 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::LinkOnceLinkage; ;
break;}
case 75:
-#line 1177 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1188 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::AppendingLinkage; ;
break;}
case 76:
-#line 1178 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1189 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::DLLExportLinkage; ;
break;}
case 77:
-#line 1182 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1193 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::DLLImportLinkage; ;
break;}
case 78:
-#line 1183 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1194 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::ExternalWeakLinkage; ;
break;}
case 79:
-#line 1184 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1195 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::ExternalLinkage; ;
break;}
case 80:
-#line 1188 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1199 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Visibility = GlobalValue::DefaultVisibility; ;
break;}
case 81:
-#line 1189 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1200 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Visibility = GlobalValue::DefaultVisibility; ;
break;}
case 82:
-#line 1190 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1201 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Visibility = GlobalValue::HiddenVisibility; ;
break;}
case 83:
-#line 1191 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1202 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Visibility = GlobalValue::ProtectedVisibility; ;
break;}
case 84:
-#line 1195 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1206 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::ExternalLinkage; ;
break;}
case 85:
-#line 1196 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1207 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::DLLImportLinkage; ;
break;}
case 86:
-#line 1197 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1208 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::ExternalWeakLinkage; ;
break;}
case 87:
-#line 1201 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1212 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::ExternalLinkage; ;
break;}
case 88:
-#line 1202 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1213 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::InternalLinkage; ;
break;}
case 89:
-#line 1203 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1214 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::LinkOnceLinkage; ;
break;}
case 90:
-#line 1204 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1215 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::WeakLinkage; ;
break;}
case 91:
-#line 1205 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1216 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::DLLExportLinkage; ;
break;}
case 92:
-#line 1209 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1220 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::ExternalLinkage; ;
break;}
case 93:
-#line 1210 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1221 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::WeakLinkage; ;
break;}
case 94:
-#line 1211 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1222 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::InternalLinkage; ;
break;}
case 95:
-#line 1214 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1225 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.UIntVal = CallingConv::C; ;
break;}
case 96:
-#line 1215 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1226 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.UIntVal = CallingConv::C; ;
break;}
case 97:
-#line 1216 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1227 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.UIntVal = CallingConv::Fast; ;
break;}
case 98:
-#line 1217 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1228 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.UIntVal = CallingConv::Cold; ;
break;}
case 99:
-#line 1218 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1229 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.UIntVal = CallingConv::X86_StdCall; ;
break;}
case 100:
-#line 1219 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1230 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.UIntVal = CallingConv::X86_FastCall; ;
break;}
case 101:
-#line 1220 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1231 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if ((unsigned)yyvsp[0].UInt64Val != yyvsp[0].UInt64Val)
GEN_ERROR("Calling conv too large");
;
break;}
case 102:
-#line 1227 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1238 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ParamAttrs = ParamAttr::ZExt; ;
break;}
case 103:
-#line 1228 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1239 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ParamAttrs = ParamAttr::ZExt; ;
break;}
case 104:
-#line 1229 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1240 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ParamAttrs = ParamAttr::SExt; ;
break;}
case 105:
-#line 1230 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1241 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ParamAttrs = ParamAttr::SExt; ;
break;}
case 106:
-#line 1231 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1242 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ParamAttrs = ParamAttr::InReg; ;
break;}
case 107:
-#line 1232 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1243 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ParamAttrs = ParamAttr::StructRet; ;
break;}
case 108:
-#line 1233 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1244 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ParamAttrs = ParamAttr::NoAlias; ;
break;}
case 109:
-#line 1234 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1245 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ParamAttrs = ParamAttr::ByVal; ;
break;}
case 110:
-#line 1235 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1246 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ParamAttrs = ParamAttr::Nest; ;
break;}
case 111:
-#line 1238 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1249 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ParamAttrs = ParamAttr::None; ;
break;}
case 112:
-#line 1239 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1250 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ParamAttrs = yyvsp[-1].ParamAttrs | yyvsp[0].ParamAttrs;
;
break;}
case 113:
-#line 1244 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1255 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ParamAttrs = ParamAttr::NoReturn; ;
break;}
case 114:
-#line 1245 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1256 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ParamAttrs = ParamAttr::NoUnwind; ;
break;}
case 115:
-#line 1246 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1257 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ParamAttrs = ParamAttr::ZExt; ;
break;}
case 116:
-#line 1247 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1258 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ParamAttrs = ParamAttr::SExt; ;
break;}
case 117:
-#line 1250 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1261 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ParamAttrs = ParamAttr::None; ;
break;}
case 118:
-#line 1251 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1262 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ParamAttrs = yyvsp[-1].ParamAttrs | yyvsp[0].ParamAttrs;
;
break;}
case 119:
-#line 1258 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1269 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.UIntVal = 0; ;
break;}
case 120:
-#line 1259 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1270 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.UIntVal = yyvsp[0].UInt64Val;
if (yyval.UIntVal != 0 && !isPowerOf2_32(yyval.UIntVal))
;
break;}
case 121:
-#line 1265 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1276 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.UIntVal = 0; ;
break;}
case 122:
-#line 1266 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1277 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.UIntVal = yyvsp[0].UInt64Val;
if (yyval.UIntVal != 0 && !isPowerOf2_32(yyval.UIntVal))
;
break;}
case 123:
-#line 1274 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1285 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
for (unsigned i = 0, e = yyvsp[0].StrVal->length(); i != e; ++i)
if ((*yyvsp[0].StrVal)[i] == '"' || (*yyvsp[0].StrVal)[i] == '\\')
;
break;}
case 124:
-#line 1282 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1293 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.StrVal = 0; ;
break;}
case 125:
-#line 1283 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1294 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.StrVal = yyvsp[0].StrVal; ;
break;}
case 126:
-#line 1288 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1299 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{;
break;}
case 127:
-#line 1289 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1300 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{;
break;}
case 128:
-#line 1290 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1301 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV->setSection(*yyvsp[0].StrVal);
delete yyvsp[0].StrVal;
;
break;}
case 129:
-#line 1295 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1306 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (yyvsp[0].UInt64Val != 0 && !isPowerOf2_32(yyvsp[0].UInt64Val))
GEN_ERROR("Alignment must be a power of two");
;
break;}
case 137:
-#line 1311 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1322 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.TypeVal = new PATypeHolder(OpaqueType::get());
CHECK_FOR_ERROR
;
break;}
case 138:
-#line 1315 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1326 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType);
CHECK_FOR_ERROR
;
break;}
case 139:
-#line 1319 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1330 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Pointer type?
if (*yyvsp[-1].TypeVal == Type::LabelTy)
GEN_ERROR("Cannot form a pointer to a basic block");
;
break;}
case 140:
-#line 1326 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1337 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Named types are also simple types...
const Type* tmp = getTypeVal(yyvsp[0].ValIDVal);
CHECK_FOR_ERROR
;
break;}
case 141:
-#line 1331 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1342 "/Volumes/MacOS9/gcc/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
;
break;}
case 142:
-#line 1339 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1350 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
std::vector<const Type*> Params;
ParamAttrsVector Attrs;
;
break;}
case 143:
-#line 1369 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1380 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
std::vector<const Type*> Params;
ParamAttrsVector Attrs;
;
break;}
case 144:
-#line 1400 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1411 "/Volumes/MacOS9/gcc/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;
;
break;}
case 145:
-#line 1405 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1416 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Vector type?
const llvm::Type* ElemTy = yyvsp[-1].TypeVal->get();
if ((unsigned)yyvsp[-3].UInt64Val != yyvsp[-3].UInt64Val)
;
break;}
case 146:
-#line 1417 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1428 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Structure type?
std::vector<const Type*> Elements;
for (std::list<llvm::PATypeHolder>::iterator I = yyvsp[-1].TypeList->begin(),
;
break;}
case 147:
-#line 1427 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1438 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Empty structure type?
yyval.TypeVal = new PATypeHolder(StructType::get(std::vector<const Type*>()));
CHECK_FOR_ERROR
;
break;}
case 148:
-#line 1431 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1442 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
std::vector<const Type*> Elements;
for (std::list<llvm::PATypeHolder>::iterator I = yyvsp[-2].TypeList->begin(),
;
break;}
case 149:
-#line 1441 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1452 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Empty structure type?
yyval.TypeVal = new PATypeHolder(StructType::get(std::vector<const Type*>(), true));
CHECK_FOR_ERROR
;
break;}
case 150:
-#line 1448 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1459 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.TypeWithAttrs.Ty = yyvsp[-1].TypeVal;
yyval.TypeWithAttrs.Attrs = yyvsp[0].ParamAttrs;
;
break;}
case 151:
-#line 1455 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1466 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription());
;
break;}
case 152:
-#line 1462 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1473 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.TypeVal = new PATypeHolder(Type::VoidTy);
;
break;}
case 153:
-#line 1467 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1478 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.TypeWithAttrsList = new TypeWithAttrsList();
yyval.TypeWithAttrsList->push_back(yyvsp[0].TypeWithAttrs);
;
break;}
case 154:
-#line 1472 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1483 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeWithAttrsList=yyvsp[-2].TypeWithAttrsList)->push_back(yyvsp[0].TypeWithAttrs);
CHECK_FOR_ERROR
;
break;}
case 156:
-#line 1480 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1491 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.TypeWithAttrsList=yyvsp[-2].TypeWithAttrsList;
TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None;
;
break;}
case 157:
-#line 1487 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1498 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.TypeWithAttrsList = new TypeWithAttrsList;
TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None;
;
break;}
case 158:
-#line 1494 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1505 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.TypeWithAttrsList = new TypeWithAttrsList();
CHECK_FOR_ERROR
;
break;}
case 159:
-#line 1502 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1513 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.TypeList = new std::list<PATypeHolder>();
yyval.TypeList->push_back(*yyvsp[0].TypeVal);
;
break;}
case 160:
-#line 1508 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1519 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeList=yyvsp[-2].TypeList)->push_back(*yyvsp[0].TypeVal);
delete yyvsp[0].TypeVal;
;
break;}
case 161:
-#line 1520 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1531 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Nonempty unsized arr
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription());
;
break;}
case 162:
-#line 1548 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1559 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
;
break;}
case 163:
-#line 1564 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1575 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
;
break;}
case 164:
-#line 1591 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1602 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Nonempty unsized arr
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription());
;
break;}
case 165:
-#line 1619 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1630 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
const StructType *STy = dyn_cast<StructType>(yyvsp[-3].TypeVal->get());
if (STy == 0)
;
break;}
case 166:
-#line 1645 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1656 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
;
break;}
case 167:
-#line 1665 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1676 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
const StructType *STy = dyn_cast<StructType>(yyvsp[-5].TypeVal->get());
if (STy == 0)
;
break;}
case 168:
-#line 1691 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1702 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-4].TypeVal)->getDescription());
;
break;}
case 169:
-#line 1711 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1722 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
;
break;}
case 170:
-#line 1723 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1734 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
;
break;}
case 171:
-#line 1730 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1741 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
;
break;}
case 172:
-#line 1796 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1807 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
;
break;}
case 173:
-#line 1806 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1817 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
;
break;}
case 174:
-#line 1816 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1827 "/Volumes/MacOS9/gcc/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");
;
break;}
case 175:
-#line 1822 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1833 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // arbitrary precision integer constants
uint32_t BitWidth = cast<IntegerType>(yyvsp[-1].PrimType)->getBitWidth();
if (yyvsp[0].APIntVal->getBitWidth() > BitWidth) {
;
break;}
case 176:
-#line 1832 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1843 "/Volumes/MacOS9/gcc/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");
;
break;}
case 177:
-#line 1838 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1849 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // arbitrary precision integer constants
uint32_t BitWidth = cast<IntegerType>(yyvsp[-1].PrimType)->getBitWidth();
if (yyvsp[0].APIntVal->getBitWidth() > BitWidth) {
;
break;}
case 178:
-#line 1848 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1859 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Boolean constants
assert(cast<IntegerType>(yyvsp[-1].PrimType)->getBitWidth() == 1 && "Not Bool?");
yyval.ConstVal = ConstantInt::getTrue();
;
break;}
case 179:
-#line 1853 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1864 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Boolean constants
assert(cast<IntegerType>(yyvsp[-1].PrimType)->getBitWidth() == 1 && "Not Bool?");
yyval.ConstVal = ConstantInt::getFalse();
;
break;}
case 180:
-#line 1858 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
-{ // Float & Double constants
- if (!ConstantFP::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].FPVal))
+#line 1869 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+{ // Floating point constants
+ if (!ConstantFP::isValueValidForType(yyvsp[-1].PrimType, *yyvsp[0].FPVal))
GEN_ERROR("Floating point constant invalid for type");
- yyval.ConstVal = ConstantFP::get(yyvsp[-1].PrimType, yyvsp[0].FPVal);
+ // Lexer has no type info, so builds all float and double FP constants
+ // as double. Fix this here. Long double is done right.
+ if (&yyvsp[0].FPVal->getSemantics()==&APFloat::IEEEdouble && yyvsp[-1].PrimType==Type::FloatTy)
+ yyvsp[0].FPVal->convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven);
+ yyval.ConstVal = ConstantFP::get(yyvsp[-1].PrimType, *yyvsp[0].FPVal);
+ delete yyvsp[0].FPVal;
CHECK_FOR_ERROR
;
break;}
case 181:
-#line 1866 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1882 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
;
break;}
case 182:
-#line 1878 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1894 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!isa<PointerType>(yyvsp[-2].ConstVal->getType()))
GEN_ERROR("GetElementPtr requires a pointer operand");
const Type *IdxTy =
- GetElementPtrInst::getIndexedType(yyvsp[-2].ConstVal->getType(), &(*yyvsp[-1].ValueList)[0], yyvsp[-1].ValueList->size(),
+ GetElementPtrInst::getIndexedType(yyvsp[-2].ConstVal->getType(), yyvsp[-1].ValueList->begin(), yyvsp[-1].ValueList->end(),
true);
if (!IdxTy)
GEN_ERROR("Index list invalid for constant getelementptr");
;
break;}
case 183:
-#line 1900 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1916 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (yyvsp[-5].ConstVal->getType() != Type::Int1Ty)
GEN_ERROR("Select condition must be of boolean type");
;
break;}
case 184:
-#line 1908 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1924 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType())
GEN_ERROR("Binary operator types must match");
;
break;}
case 185:
-#line 1914 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1930 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType())
GEN_ERROR("Logical operator types must match");
;
break;}
case 186:
-#line 1925 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1941 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType())
GEN_ERROR("icmp operand types must match");
;
break;}
case 187:
-#line 1930 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1946 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType())
GEN_ERROR("fcmp operand types must match");
;
break;}
case 188:
-#line 1935 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1951 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!ExtractElementInst::isValidOperands(yyvsp[-3].ConstVal, yyvsp[-1].ConstVal))
GEN_ERROR("Invalid extractelement operands");
;
break;}
case 189:
-#line 1941 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1957 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!InsertElementInst::isValidOperands(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal))
GEN_ERROR("Invalid insertelement operands");
;
break;}
case 190:
-#line 1947 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1963 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!ShuffleVectorInst::isValidOperands(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal))
GEN_ERROR("Invalid shufflevector operands");
;
break;}
case 191:
-#line 1956 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1972 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
(yyval.ConstVector = yyvsp[-2].ConstVector)->push_back(yyvsp[0].ConstVal);
CHECK_FOR_ERROR
;
break;}
case 192:
-#line 1960 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1976 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ConstVector = new std::vector<Constant*>();
yyval.ConstVector->push_back(yyvsp[0].ConstVal);
;
break;}
case 193:
-#line 1968 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1984 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.BoolVal = false; ;
break;}
case 194:
-#line 1968 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1984 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.BoolVal = true; ;
break;}
case 195:
-#line 1971 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1987 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.BoolVal = true; ;
break;}
case 196:
-#line 1971 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1987 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.BoolVal = false; ;
break;}
case 197:
-#line 1974 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1990 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
const Type* VTy = yyvsp[-1].TypeVal->get();
Value *V = getVal(VTy, yyvsp[0].ValIDVal);
+ CHECK_FOR_ERROR
GlobalValue* Aliasee = dyn_cast<GlobalValue>(V);
if (!Aliasee)
GEN_ERROR("Aliases can be created only to global values");
;
break;}
case 198:
-#line 1985 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2002 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
Constant *Val = yyvsp[-3].ConstVal;
const Type *DestTy = yyvsp[-1].TypeVal->get();
;
break;}
case 199:
-#line 2006 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2023 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ModuleVal = ParserResult = CurModule.CurrentModule;
CurModule.ModuleDone();
;
break;}
case 200:
-#line 2011 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2028 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ModuleVal = ParserResult = CurModule.CurrentModule;
CurModule.ModuleDone();
;
break;}
case 203:
-#line 2024 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2041 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ CurFun.isDeclare = false; ;
break;}
case 204:
-#line 2024 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2041 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurFun.FunctionDone();
CHECK_FOR_ERROR
;
break;}
case 205:
-#line 2028 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2045 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ CurFun.isDeclare = true; ;
break;}
case 206:
-#line 2028 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2045 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;
break;}
case 207:
-#line 2031 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2048 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;
break;}
case 208:
-#line 2034 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2051 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription());
;
break;}
case 209:
-#line 2058 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2075 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
ResolveTypeTo(yyvsp[-2].StrVal, yyvsp[0].PrimType);
;
break;}
case 210:
-#line 2069 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2086 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
/* "Externally Visible" Linkage */
if (yyvsp[0].ConstVal == 0)
;
break;}
case 211:
-#line 2076 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2093 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV = 0;
;
break;}
case 212:
-#line 2080 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2097 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (yyvsp[0].ConstVal == 0)
GEN_ERROR("Global value initializer is not a constant");
;
break;}
case 213:
-#line 2085 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2102 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV = 0;
;
break;}
case 214:
-#line 2089 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2106 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription());
;
break;}
case 215:
-#line 2095 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2112 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurGV = 0;
CHECK_FOR_ERROR
;
break;}
case 216:
-#line 2099 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2116 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
std::string Name;
if (yyvsp[-4].StrVal) {
CurModule.CurrentModule);
GA->setVisibility(yyvsp[-3].Visibility);
InsertValue(GA, CurModule.Values);
+
+
+ // If there was a forward reference of this alias, resolve it now.
+
+ ValID ID;
+ if (!Name.empty())
+ ID = ValID::createGlobalName(Name);
+ else
+ ID = ValID::createGlobalID(CurModule.Values.size()-1);
+
+ if (GlobalValue *FWGV =
+ CurModule.GetForwardRefForGlobal(GA->getType(), ID)) {
+ // Replace uses of the fwdref with the actual alias.
+ FWGV->replaceAllUsesWith(GA);
+ if (GlobalVariable *GV = dyn_cast<GlobalVariable>(FWGV))
+ GV->eraseFromParent();
+ else
+ cast<Function>(FWGV)->eraseFromParent();
+ }
+ ID.destroy();
+
CHECK_FOR_ERROR
;
break;}
case 217:
-#line 2118 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2156 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;
break;}
case 218:
-#line 2121 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2159 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;
break;}
case 219:
-#line 2127 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2165 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm();
if (AsmSoFar.empty())
;
break;}
case 220:
-#line 2137 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2175 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->setTargetTriple(*yyvsp[0].StrVal);
delete yyvsp[0].StrVal;
;
break;}
case 221:
-#line 2141 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2179 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->setDataLayout(*yyvsp[0].StrVal);
delete yyvsp[0].StrVal;
;
break;}
case 223:
-#line 2148 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2186 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->addLibrary(*yyvsp[0].StrVal);
delete yyvsp[0].StrVal;
;
break;}
case 224:
-#line 2153 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2191 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurModule.CurrentModule->addLibrary(*yyvsp[0].StrVal);
delete yyvsp[0].StrVal;
;
break;}
case 225:
-#line 2158 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2196 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
CHECK_FOR_ERROR
;
break;}
case 226:
-#line 2167 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2205 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
;
break;}
case 227:
-#line 2177 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2215 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
;
break;}
case 228:
-#line 2188 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2226 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ArgList = yyvsp[0].ArgList;
CHECK_FOR_ERROR
;
break;}
case 229:
-#line 2192 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2230 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ArgList = yyvsp[-2].ArgList;
struct ArgListEntry E;
;
break;}
case 230:
-#line 2201 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2239 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ArgList = new ArgListType;
struct ArgListEntry E;
;
break;}
case 231:
-#line 2210 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2248 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ArgList = 0;
CHECK_FOR_ERROR
;
break;}
case 232:
-#line 2216 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2254 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
std::string FunctionName(*yyvsp[-6].StrVal);
delete yyvsp[-6].StrVal; // Free strdup'd memory!
;
break;}
case 235:
-#line 2338 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2376 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.FunctionVal = CurFun.CurrentFunction;
;
break;}
case 238:
-#line 2349 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2387 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.FunctionVal = yyvsp[-1].FunctionVal;
CHECK_FOR_ERROR
;
break;}
case 239:
-#line 2354 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2392 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
CurFun.CurrentFunction->setLinkage(yyvsp[-2].Linkage);
CurFun.CurrentFunction->setVisibility(yyvsp[-1].Visibility);
;
break;}
case 240:
-#line 2366 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2404 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.BoolVal = false;
CHECK_FOR_ERROR
;
break;}
case 241:
-#line 2370 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2408 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.BoolVal = true;
CHECK_FOR_ERROR
;
break;}
case 242:
-#line 2375 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2413 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // A reference to a direct constant
yyval.ValIDVal = ValID::create(yyvsp[0].SInt64Val);
CHECK_FOR_ERROR
;
break;}
case 243:
-#line 2379 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2417 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ValIDVal = ValID::create(yyvsp[0].UInt64Val);
CHECK_FOR_ERROR
;
break;}
case 244:
-#line 2383 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2421 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Perhaps it's an FP constant?
yyval.ValIDVal = ValID::create(yyvsp[0].FPVal);
CHECK_FOR_ERROR
;
break;}
case 245:
-#line 2387 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2425 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ValIDVal = ValID::create(ConstantInt::getTrue());
CHECK_FOR_ERROR
;
break;}
case 246:
-#line 2391 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2429 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ValIDVal = ValID::create(ConstantInt::getFalse());
CHECK_FOR_ERROR
;
break;}
case 247:
-#line 2395 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2433 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ValIDVal = ValID::createNull();
CHECK_FOR_ERROR
;
break;}
case 248:
-#line 2399 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2437 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ValIDVal = ValID::createUndef();
CHECK_FOR_ERROR
;
break;}
case 249:
-#line 2403 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2441 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // A vector zero constant.
yyval.ValIDVal = ValID::createZeroInit();
CHECK_FOR_ERROR
;
break;}
case 250:
-#line 2407 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2445 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Nonempty unsized packed vector
const Type *ETy = (*yyvsp[-1].ConstVector)[0]->getType();
int NumElements = yyvsp[-1].ConstVector->size();
;
break;}
case 251:
-#line 2432 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2470 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ValIDVal = ValID::create(yyvsp[0].ConstVal);
CHECK_FOR_ERROR
;
break;}
case 252:
-#line 2436 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2474 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ValIDVal = ValID::createInlineAsm(*yyvsp[-2].StrVal, *yyvsp[0].StrVal, yyvsp[-3].BoolVal);
delete yyvsp[-2].StrVal;
;
break;}
case 253:
-#line 2446 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2484 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Is it an integer reference...?
yyval.ValIDVal = ValID::createLocalID(yyvsp[0].UIntVal);
CHECK_FOR_ERROR
;
break;}
case 254:
-#line 2450 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2488 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ValIDVal = ValID::createGlobalID(yyvsp[0].UIntVal);
CHECK_FOR_ERROR
;
break;}
case 255:
-#line 2454 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2492 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Is it a named reference...?
yyval.ValIDVal = ValID::createLocalName(*yyvsp[0].StrVal);
delete yyvsp[0].StrVal;
;
break;}
case 256:
-#line 2459 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2497 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Is it a named reference...?
yyval.ValIDVal = ValID::createGlobalName(*yyvsp[0].StrVal);
delete yyvsp[0].StrVal;
;
break;}
case 259:
-#line 2472 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2510 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
;
break;}
case 260:
-#line 2481 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2519 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.FunctionVal = yyvsp[-1].FunctionVal;
CHECK_FOR_ERROR
;
break;}
case 261:
-#line 2485 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2523 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Do not allow functions with 0 basic blocks
yyval.FunctionVal = yyvsp[-1].FunctionVal;
CHECK_FOR_ERROR
;
break;}
case 262:
-#line 2494 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2532 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
setValueName(yyvsp[0].TermInstVal, yyvsp[-1].StrVal);
CHECK_FOR_ERROR
;
break;}
case 263:
-#line 2503 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2541 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (CastInst *CI1 = dyn_cast<CastInst>(yyvsp[0].InstVal))
if (CastInst *CI2 = dyn_cast<CastInst>(CI1->getOperand(0)))
;
break;}
case 264:
-#line 2512 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2550 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Empty space between instruction lists
yyval.BasicBlockVal = defineBBVal(ValID::createLocalID(CurFun.NextValNum));
CHECK_FOR_ERROR
;
break;}
case 265:
-#line 2516 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2554 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Labelled (named) basic block
yyval.BasicBlockVal = defineBBVal(ValID::createLocalName(*yyvsp[0].StrVal));
delete yyvsp[0].StrVal;
;
break;}
case 266:
-#line 2523 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2561 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Return with a result...
yyval.TermInstVal = new ReturnInst(yyvsp[0].ValueVal);
CHECK_FOR_ERROR
;
break;}
case 267:
-#line 2527 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2565 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Return with no result...
yyval.TermInstVal = new ReturnInst();
CHECK_FOR_ERROR
;
break;}
case 268:
-#line 2531 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2569 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Unconditional Branch...
BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal);
CHECK_FOR_ERROR
;
break;}
case 269:
-#line 2536 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2574 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
assert(cast<IntegerType>(yyvsp[-7].PrimType)->getBitWidth() == 1 && "Not Bool?");
BasicBlock* tmpBBA = getBBVal(yyvsp[-3].ValIDVal);
;
break;}
case 270:
-#line 2546 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2584 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
Value* tmpVal = getVal(yyvsp[-7].PrimType, yyvsp[-6].ValIDVal);
CHECK_FOR_ERROR
;
break;}
case 271:
-#line 2565 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2603 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
Value* tmpVal = getVal(yyvsp[-6].PrimType, yyvsp[-5].ValIDVal);
CHECK_FOR_ERROR
;
break;}
case 272:
-#line 2575 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2613 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Handle the short syntax
}
// Create the InvokeInst
- InvokeInst *II = new InvokeInst(V, Normal, Except, &Args[0], Args.size());
+ InvokeInst *II = new InvokeInst(V, Normal, Except, Args.begin(), Args.end());
II->setCallingConv(yyvsp[-12].UIntVal);
yyval.TermInstVal = II;
delete yyvsp[-8].ValueRefList;
;
break;}
case 273:
-#line 2654 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2692 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.TermInstVal = new UnwindInst();
CHECK_FOR_ERROR
;
break;}
case 274:
-#line 2658 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2696 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.TermInstVal = new UnreachableInst();
CHECK_FOR_ERROR
;
break;}
case 275:
-#line 2665 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2703 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.JumpTable = yyvsp[-5].JumpTable;
Constant *V = cast<Constant>(getExistingVal(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal));
;
break;}
case 276:
-#line 2676 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2714 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.JumpTable = new std::vector<std::pair<Constant*, BasicBlock*> >();
Constant *V = cast<Constant>(getExistingVal(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal));
;
break;}
case 277:
-#line 2689 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2727 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Is this definition named?? if so, assign the name...
setValueName(yyvsp[0].InstVal, yyvsp[-1].StrVal);
;
break;}
case 278:
-#line 2699 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2737 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ // Used for PHI nodes
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-5].TypeVal)->getDescription());
;
break;}
case 279:
-#line 2710 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2748 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.PHIList = yyvsp[-6].PHIList;
Value* tmpVal = getVal(yyvsp[-6].PHIList->front().first->getType(), yyvsp[-3].ValIDVal);
;
break;}
case 280:
-#line 2720 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2758 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
;
break;}
case 281:
-#line 2729 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2767 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
;
break;}
case 282:
-#line 2738 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2776 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ValueRefList = new ValueRefList(); ;
break;}
case 283:
-#line 2741 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2779 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{ yyval.ValueList = new std::vector<Value*>(); ;
break;}
case 284:
-#line 2742 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2780 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.ValueList = yyvsp[-2].ValueList;
yyval.ValueList->push_back(yyvsp[0].ValueVal);
;
break;}
case 285:
-#line 2749 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2787 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.BoolVal = true;
CHECK_FOR_ERROR
;
break;}
case 286:
-#line 2753 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2791 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.BoolVal = false;
CHECK_FOR_ERROR
;
break;}
case 287:
-#line 2758 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2796 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription());
;
break;}
case 288:
-#line 2779 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2817 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription());
;
break;}
case 289:
-#line 2796 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2834 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription());
;
break;}
case 290:
-#line 2810 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2848 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription());
;
break;}
case 291:
-#line 2824 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2862 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription());
;
break;}
case 292:
-#line 2836 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2874 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (yyvsp[-4].ValueVal->getType() != Type::Int1Ty)
GEN_ERROR("select condition must be boolean");
;
break;}
case 293:
-#line 2844 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2882 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription());
;
break;}
case 294:
-#line 2851 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2889 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!ExtractElementInst::isValidOperands(yyvsp[-2].ValueVal, yyvsp[0].ValueVal))
GEN_ERROR("Invalid extractelement operands");
;
break;}
case 295:
-#line 2857 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2895 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!InsertElementInst::isValidOperands(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal))
GEN_ERROR("Invalid insertelement operands");
;
break;}
case 296:
-#line 2863 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2901 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!ShuffleVectorInst::isValidOperands(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal))
GEN_ERROR("Invalid shufflevector operands");
;
break;}
case 297:
-#line 2869 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2907 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
const Type *Ty = yyvsp[0].PHIList->front().first->getType();
if (!Ty->isFirstClassType())
;
break;}
case 298:
-#line 2885 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 2923 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
// Handle the short syntax
;
break;}
case 299:
-#line 2969 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3007 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.InstVal = yyvsp[0].InstVal;
CHECK_FOR_ERROR
;
break;}
case 300:
-#line 2974 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3012 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.BoolVal = true;
CHECK_FOR_ERROR
;
break;}
case 301:
-#line 2978 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3016 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
yyval.BoolVal = false;
CHECK_FOR_ERROR
;
break;}
case 302:
-#line 2985 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3023 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
;
break;}
case 303:
-#line 2992 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3030 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-4].TypeVal)->getDescription());
;
break;}
case 304:
-#line 3000 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3038 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription());
;
break;}
case 305:
-#line 3007 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3045 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-4].TypeVal)->getDescription());
;
break;}
case 306:
-#line 3015 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3053 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!isa<PointerType>(yyvsp[0].ValueVal->getType()))
GEN_ERROR("Trying to free nonpointer type " +
;
break;}
case 307:
-#line 3023 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3061 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
;
break;}
case 308:
-#line 3037 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3075 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
;
break;}
case 309:
-#line 3054 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3092 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription());
if (!isa<PointerType>(yyvsp[-2].TypeVal->get()))
GEN_ERROR("getelementptr insn requires pointer operand");
- if (!GetElementPtrInst::getIndexedType(*yyvsp[-2].TypeVal, &(*yyvsp[0].ValueList)[0], yyvsp[0].ValueList->size(), true))
+ if (!GetElementPtrInst::getIndexedType(*yyvsp[-2].TypeVal, yyvsp[0].ValueList->begin(), yyvsp[0].ValueList->end(), true))
GEN_ERROR("Invalid getelementptr indices for type '" +
(*yyvsp[-2].TypeVal)->getDescription()+ "'");
Value* tmpVal = getVal(*yyvsp[-2].TypeVal, yyvsp[-1].ValIDVal);
CHECK_FOR_ERROR
- yyval.InstVal = new GetElementPtrInst(tmpVal, &(*yyvsp[0].ValueList)[0], yyvsp[0].ValueList->size());
+ yyval.InstVal = new GetElementPtrInst(tmpVal, yyvsp[0].ValueList->begin(), yyvsp[0].ValueList->end());
delete yyvsp[-2].TypeVal;
delete yyvsp[0].ValueList;
;
}
return 1;
}
-#line 3071 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
+#line 3109 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y"
// common code from the two 'RunVMAsmParser' functions