[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y.cvs

Reid Spencer reid at x10sys.com
Tue Jan 2 13:54:28 PST 2007



Changes in directory llvm/lib/AsmParser:

llvmAsmParser.cpp.cvs updated: 1.41 -> 1.42
llvmAsmParser.h.cvs updated: 1.33 -> 1.34
llvmAsmParser.y.cvs updated: 1.42 -> 1.43
---
Log message:

Regenerate.


---
Diffs of the changes:  (+385 -267)

 llvmAsmParser.cpp.cvs |  591 +++++++++++++++++++++++++++-----------------------
 llvmAsmParser.h.cvs   |    2 
 llvmAsmParser.y.cvs   |   59 ++++
 3 files changed, 385 insertions(+), 267 deletions(-)


Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs
diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.41 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.42
--- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.41	Sun Dec 31 15:47:02 2006
+++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs	Tue Jan  2 15:54:12 2007
@@ -475,6 +475,58 @@
     }
     return Ret;
   }
+
+  bool TypeIsUnresolved(PATypeHolder* PATy) {
+    // If it isn't abstract, its resolved
+    const Type* Ty = PATy->get();
+    if (!Ty->isAbstract())
+      return false;
+    // Traverse the type looking for abstract types. If it isn't abstract then
+    // we don't need to traverse that leg of the type. 
+    std::vector<const Type*> WorkList, SeenList;
+    WorkList.push_back(Ty);
+    while (!WorkList.empty()) {
+      const Type* Ty = WorkList.back();
+      SeenList.push_back(Ty);
+      WorkList.pop_back();
+      if (const OpaqueType* OpTy = dyn_cast<OpaqueType>(Ty)) {
+        // Check to see if this is an unresolved type
+        std::map<ValID, PATypeHolder>::iterator I = LateResolveTypes.begin();
+        std::map<ValID, PATypeHolder>::iterator E = LateResolveTypes.end();
+        for ( ; I != E; ++I) {
+          if (I->second.get() == OpTy)
+            return true;
+        }
+      } else if (const SequentialType* SeqTy = dyn_cast<SequentialType>(Ty)) {
+        const Type* TheTy = SeqTy->getElementType();
+        if (TheTy->isAbstract() && TheTy != Ty) {
+          std::vector<const Type*>::iterator I = SeenList.begin(), 
+                                             E = SeenList.end();
+          for ( ; I != E; ++I)
+            if (*I == TheTy)
+              break;
+          if (I == E)
+            WorkList.push_back(TheTy);
+        }
+      } else if (const StructType* StrTy = dyn_cast<StructType>(Ty)) {
+        for (unsigned i = 0; i < StrTy->getNumElements(); ++i) {
+          const Type* TheTy = StrTy->getElementType(i);
+          if (TheTy->isAbstract() && TheTy != Ty) {
+            std::vector<const Type*>::iterator I = SeenList.begin(), 
+                                               E = SeenList.end();
+            for ( ; I != E; ++I)
+              if (*I == TheTy)
+                break;
+            if (I == E)
+              WorkList.push_back(TheTy);
+          }
+        }
+      }
+    }
+    return false;
+  }
+
+
 } CurModule;
 
 static struct PerFunctionInfo {
@@ -1185,7 +1237,7 @@
 #endif
 
 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 843 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 895 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
 typedef union YYSTYPE {
   llvm::Module                           *ModuleVal;
   llvm::Function                         *FunctionVal;
@@ -1232,7 +1284,7 @@
   llvm::FCmpInst::Predicate         FPredicate;
 } YYSTYPE;
 /* Line 196 of yacc.c.  */
-#line 1236 "llvmAsmParser.tab.c"
+#line 1288 "llvmAsmParser.tab.c"
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
 # define YYSTYPE_IS_TRIVIAL 1
@@ -1244,7 +1296,7 @@
 
 
 /* Line 219 of yacc.c.  */
-#line 1248 "llvmAsmParser.tab.c"
+#line 1300 "llvmAsmParser.tab.c"
 
 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
 # define YYSIZE_T __SIZE_TYPE__
@@ -1593,35 +1645,35 @@
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const unsigned short int yyrline[] =
 {
-       0,   983,   983,   984,   994,   994,   994,   994,   994,   994,
-     994,   994,   994,   995,   995,   995,   996,   996,   996,   996,
-     996,   996,   997,   997,   997,   997,   997,   997,   998,   998,
-     998,  1000,  1000,  1001,  1001,  1002,  1002,  1003,  1003,  1004,
-    1004,  1008,  1008,  1009,  1009,  1010,  1010,  1011,  1011,  1012,
-    1012,  1013,  1013,  1014,  1014,  1015,  1016,  1021,  1021,  1021,
-    1021,  1022,  1022,  1025,  1029,  1035,  1036,  1037,  1038,  1039,
-    1043,  1044,  1045,  1049,  1050,  1051,  1055,  1056,  1057,  1058,
-    1059,  1062,  1063,  1064,  1065,  1066,  1067,  1068,  1069,  1076,
-    1077,  1080,  1081,  1086,  1087,  1088,  1093,  1094,  1100,  1101,
-    1109,  1117,  1118,  1123,  1124,  1125,  1130,  1143,  1143,  1143,
-    1143,  1143,  1143,  1143,  1143,  1146,  1150,  1154,  1161,  1166,
-    1174,  1192,  1210,  1215,  1227,  1237,  1241,  1251,  1258,  1265,
-    1273,  1279,  1284,  1291,  1292,  1299,  1306,  1314,  1319,  1330,
-    1358,  1374,  1403,  1431,  1452,  1467,  1479,  1486,  1549,  1558,
-    1568,  1574,  1580,  1584,  1588,  1596,  1610,  1631,  1639,  1645,
-    1656,  1661,  1666,  1675,  1681,  1687,  1696,  1700,  1708,  1708,
-    1719,  1724,  1732,  1733,  1737,  1737,  1741,  1741,  1744,  1747,
-    1759,  1783,  1794,  1794,  1803,  1803,  1811,  1811,  1821,  1824,
-    1830,  1843,  1844,  1846,  1850,  1859,  1863,  1868,  1870,  1875,
-    1880,  1889,  1889,  1890,  1890,  1892,  1902,  1913,  1917,  1926,
-    1935,  1940,  2038,  2038,  2040,  2048,  2048,  2050,  2055,  2066,
-    2070,  2075,  2079,  2083,  2087,  2091,  2095,  2099,  2103,  2107,
-    2132,  2136,  2150,  2154,  2160,  2160,  2166,  2175,  2179,  2188,
-    2199,  2208,  2220,  2233,  2237,  2241,  2246,  2255,  2274,  2283,
-    2350,  2354,  2361,  2372,  2385,  2394,  2405,  2415,  2423,  2431,
-    2434,  2435,  2442,  2446,  2451,  2472,  2489,  2502,  2515,  2528,
-    2537,  2550,  2558,  2565,  2571,  2577,  2583,  2598,  2660,  2665,
-    2669,  2676,  2683,  2691,  2698,  2706,  2714,  2728,  2745
+       0,  1035,  1035,  1036,  1046,  1046,  1046,  1046,  1046,  1046,
+    1046,  1046,  1046,  1047,  1047,  1047,  1048,  1048,  1048,  1048,
+    1048,  1048,  1049,  1049,  1049,  1049,  1049,  1049,  1050,  1050,
+    1050,  1052,  1052,  1053,  1053,  1054,  1054,  1055,  1055,  1056,
+    1056,  1060,  1060,  1061,  1061,  1062,  1062,  1063,  1063,  1064,
+    1064,  1065,  1065,  1066,  1066,  1067,  1068,  1073,  1073,  1073,
+    1073,  1074,  1074,  1077,  1081,  1087,  1088,  1089,  1090,  1091,
+    1095,  1096,  1097,  1101,  1102,  1103,  1107,  1108,  1109,  1110,
+    1111,  1114,  1115,  1116,  1117,  1118,  1119,  1120,  1121,  1128,
+    1129,  1132,  1133,  1138,  1139,  1140,  1145,  1146,  1152,  1153,
+    1161,  1169,  1170,  1175,  1176,  1177,  1182,  1195,  1195,  1195,
+    1195,  1195,  1195,  1195,  1195,  1198,  1202,  1206,  1213,  1218,
+    1226,  1244,  1262,  1267,  1279,  1289,  1293,  1303,  1310,  1317,
+    1325,  1331,  1336,  1343,  1344,  1351,  1358,  1366,  1371,  1382,
+    1410,  1426,  1455,  1483,  1504,  1519,  1531,  1538,  1601,  1610,
+    1620,  1626,  1632,  1636,  1640,  1648,  1662,  1683,  1691,  1697,
+    1708,  1713,  1718,  1727,  1733,  1739,  1748,  1752,  1760,  1760,
+    1771,  1776,  1784,  1785,  1789,  1789,  1793,  1793,  1796,  1799,
+    1811,  1835,  1846,  1846,  1855,  1855,  1863,  1863,  1873,  1876,
+    1882,  1895,  1896,  1898,  1902,  1911,  1915,  1920,  1922,  1927,
+    1932,  1941,  1941,  1942,  1942,  1944,  1954,  1965,  1969,  1978,
+    1987,  1992,  2097,  2097,  2099,  2107,  2107,  2109,  2114,  2125,
+    2129,  2134,  2138,  2142,  2146,  2150,  2154,  2158,  2162,  2166,
+    2191,  2195,  2209,  2213,  2219,  2219,  2225,  2234,  2238,  2247,
+    2258,  2267,  2279,  2292,  2296,  2300,  2305,  2314,  2333,  2342,
+    2409,  2413,  2420,  2431,  2444,  2453,  2464,  2474,  2482,  2490,
+    2493,  2494,  2501,  2505,  2510,  2531,  2548,  2561,  2574,  2587,
+    2596,  2609,  2617,  2624,  2630,  2636,  2642,  2657,  2719,  2724,
+    2728,  2735,  2742,  2750,  2757,  2765,  2773,  2787,  2804
 };
 #endif
 
@@ -2964,7 +3016,7 @@
   switch (yyn)
     {
         case 3:
-#line 984 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1036 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
   if ((yyvsp[0].UIntVal) > (uint32_t)INT32_MAX)     // Outside of my range!
     GEN_ERROR("Value too large for type!");
@@ -2974,137 +3026,137 @@
     break;
 
   case 31:
-#line 1000 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1052 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.IPredicate) = ICmpInst::ICMP_EQ; ;}
     break;
 
   case 32:
-#line 1000 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1052 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.IPredicate) = ICmpInst::ICMP_NE; ;}
     break;
 
   case 33:
-#line 1001 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1053 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.IPredicate) = ICmpInst::ICMP_SLT; ;}
     break;
 
   case 34:
-#line 1001 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1053 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.IPredicate) = ICmpInst::ICMP_SGT; ;}
     break;
 
   case 35:
-#line 1002 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1054 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.IPredicate) = ICmpInst::ICMP_SLE; ;}
     break;
 
   case 36:
-#line 1002 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1054 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.IPredicate) = ICmpInst::ICMP_SGE; ;}
     break;
 
   case 37:
-#line 1003 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1055 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.IPredicate) = ICmpInst::ICMP_ULT; ;}
     break;
 
   case 38:
-#line 1003 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1055 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.IPredicate) = ICmpInst::ICMP_UGT; ;}
     break;
 
   case 39:
-#line 1004 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1056 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.IPredicate) = ICmpInst::ICMP_ULE; ;}
     break;
 
   case 40:
-#line 1004 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1056 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.IPredicate) = ICmpInst::ICMP_UGE; ;}
     break;
 
   case 41:
-#line 1008 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1060 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.FPredicate) = FCmpInst::FCMP_OEQ; ;}
     break;
 
   case 42:
-#line 1008 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1060 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.FPredicate) = FCmpInst::FCMP_ONE; ;}
     break;
 
   case 43:
-#line 1009 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1061 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.FPredicate) = FCmpInst::FCMP_OLT; ;}
     break;
 
   case 44:
-#line 1009 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1061 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.FPredicate) = FCmpInst::FCMP_OGT; ;}
     break;
 
   case 45:
-#line 1010 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1062 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.FPredicate) = FCmpInst::FCMP_OLE; ;}
     break;
 
   case 46:
-#line 1010 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1062 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.FPredicate) = FCmpInst::FCMP_OGE; ;}
     break;
 
   case 47:
-#line 1011 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1063 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.FPredicate) = FCmpInst::FCMP_ORD; ;}
     break;
 
   case 48:
-#line 1011 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1063 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.FPredicate) = FCmpInst::FCMP_UNO; ;}
     break;
 
   case 49:
-#line 1012 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1064 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.FPredicate) = FCmpInst::FCMP_UEQ; ;}
     break;
 
   case 50:
-#line 1012 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1064 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.FPredicate) = FCmpInst::FCMP_UNE; ;}
     break;
 
   case 51:
-#line 1013 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1065 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.FPredicate) = FCmpInst::FCMP_ULT; ;}
     break;
 
   case 52:
-#line 1013 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1065 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.FPredicate) = FCmpInst::FCMP_UGT; ;}
     break;
 
   case 53:
-#line 1014 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1066 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.FPredicate) = FCmpInst::FCMP_ULE; ;}
     break;
 
   case 54:
-#line 1014 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1066 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.FPredicate) = FCmpInst::FCMP_UGE; ;}
     break;
 
   case 55:
-#line 1015 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1067 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.FPredicate) = FCmpInst::FCMP_TRUE; ;}
     break;
 
   case 56:
-#line 1016 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1068 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.FPredicate) = FCmpInst::FCMP_FALSE; ;}
     break;
 
   case 63:
-#line 1025 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1077 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.StrVal) = (yyvsp[-1].StrVal);
     CHECK_FOR_ERROR
@@ -3112,7 +3164,7 @@
     break;
 
   case 64:
-#line 1029 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1081 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.StrVal) = 0;
     CHECK_FOR_ERROR
@@ -3120,122 +3172,122 @@
     break;
 
   case 65:
-#line 1035 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1087 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
     break;
 
   case 66:
-#line 1036 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1088 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
     break;
 
   case 67:
-#line 1037 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1089 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;}
     break;
 
   case 68:
-#line 1038 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1090 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;}
     break;
 
   case 69:
-#line 1039 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1091 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;}
     break;
 
   case 70:
-#line 1043 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1095 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
     break;
 
   case 71:
-#line 1044 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1096 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
     break;
 
   case 72:
-#line 1045 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1097 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
     break;
 
   case 73:
-#line 1049 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1101 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
     break;
 
   case 74:
-#line 1050 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1102 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
     break;
 
   case 75:
-#line 1051 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1103 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
     break;
 
   case 76:
-#line 1055 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1107 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
     break;
 
   case 77:
-#line 1056 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1108 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
     break;
 
   case 78:
-#line 1057 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1109 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;}
     break;
 
   case 79:
-#line 1058 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1110 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
     break;
 
   case 80:
-#line 1059 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1111 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;}
     break;
 
   case 81:
-#line 1062 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1114 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.UIntVal) = CallingConv::C; ;}
     break;
 
   case 82:
-#line 1063 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1115 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.UIntVal) = CallingConv::C; ;}
     break;
 
   case 83:
-#line 1064 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1116 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.UIntVal) = CallingConv::CSRet; ;}
     break;
 
   case 84:
-#line 1065 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1117 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.UIntVal) = CallingConv::Fast; ;}
     break;
 
   case 85:
-#line 1066 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1118 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.UIntVal) = CallingConv::Cold; ;}
     break;
 
   case 86:
-#line 1067 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1119 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.UIntVal) = CallingConv::X86_StdCall; ;}
     break;
 
   case 87:
-#line 1068 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1120 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.UIntVal) = CallingConv::X86_FastCall; ;}
     break;
 
   case 88:
-#line 1069 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1121 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
                    if ((unsigned)(yyvsp[0].UInt64Val) != (yyvsp[0].UInt64Val))
                      GEN_ERROR("Calling conv too large!");
@@ -3245,49 +3297,49 @@
     break;
 
   case 89:
-#line 1076 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1128 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.ParamAttrs) = FunctionType::ZExtAttribute; ;}
     break;
 
   case 90:
-#line 1077 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1129 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.ParamAttrs) = FunctionType::SExtAttribute; ;}
     break;
 
   case 91:
-#line 1080 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1132 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.ParamAttrs) = (yyvsp[0].ParamAttrs); ;}
     break;
 
   case 92:
-#line 1081 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1133 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
                 (yyval.ParamAttrs) = FunctionType::ParameterAttributes((yyvsp[-2].ParamAttrs) | (yyvsp[0].ParamAttrs));
               ;}
     break;
 
   case 93:
-#line 1086 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1138 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.ParamAttrs) = FunctionType::NoAttributeSet; ;}
     break;
 
   case 94:
-#line 1087 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1139 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.ParamAttrs) = (yyvsp[0].ParamAttrs); ;}
     break;
 
   case 95:
-#line 1088 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1140 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.ParamAttrs) = (yyvsp[-1].ParamAttrs); ;}
     break;
 
   case 96:
-#line 1093 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1145 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.UIntVal) = 0; ;}
     break;
 
   case 97:
-#line 1094 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1146 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
   (yyval.UIntVal) = (yyvsp[0].UInt64Val);
   if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
@@ -3297,12 +3349,12 @@
     break;
 
   case 98:
-#line 1100 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1152 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.UIntVal) = 0; ;}
     break;
 
   case 99:
-#line 1101 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1153 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
   (yyval.UIntVal) = (yyvsp[0].UInt64Val);
   if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
@@ -3312,7 +3364,7 @@
     break;
 
   case 100:
-#line 1109 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1161 "/proj/llvm/llvm-3/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] == '\\')
@@ -3323,27 +3375,27 @@
     break;
 
   case 101:
-#line 1117 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1169 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.StrVal) = 0; ;}
     break;
 
   case 102:
-#line 1118 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1170 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.StrVal) = (yyvsp[0].StrVal); ;}
     break;
 
   case 103:
-#line 1123 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1175 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {;}
     break;
 
   case 104:
-#line 1124 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1176 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {;}
     break;
 
   case 105:
-#line 1125 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1177 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     CurGV->setSection((yyvsp[0].StrVal));
     free((yyvsp[0].StrVal));
@@ -3352,7 +3404,7 @@
     break;
 
   case 106:
-#line 1130 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1182 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if ((yyvsp[0].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[0].UInt64Val)))
       GEN_ERROR("Alignment must be a power of two!");
@@ -3362,7 +3414,7 @@
     break;
 
   case 115:
-#line 1146 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1198 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.TypeVal) = new PATypeHolder(OpaqueType::get());
     CHECK_FOR_ERROR
@@ -3370,7 +3422,7 @@
     break;
 
   case 116:
-#line 1150 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1202 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType));
     CHECK_FOR_ERROR
@@ -3378,7 +3430,7 @@
     break;
 
   case 117:
-#line 1154 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1206 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {                             // Pointer type?
     if (*(yyvsp[-1].TypeVal) == Type::LabelTy)
       GEN_ERROR("Cannot form a pointer to a basic block");
@@ -3389,7 +3441,7 @@
     break;
 
   case 118:
-#line 1161 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1213 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {            // Named types are also simple types...
     const Type* tmp = getTypeVal((yyvsp[0].ValIDVal));
     CHECK_FOR_ERROR
@@ -3398,7 +3450,7 @@
     break;
 
   case 119:
-#line 1166 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1218 "/proj/llvm/llvm-3/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
@@ -3410,7 +3462,7 @@
     break;
 
   case 120:
-#line 1174 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1226 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     std::vector<const Type*> Params;
     std::vector<FunctionType::ParameterAttributes> Attrs;
@@ -3432,7 +3484,7 @@
     break;
 
   case 121:
-#line 1192 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1244 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     std::vector<const Type*> Params;
     std::vector<FunctionType::ParameterAttributes> Attrs;
@@ -3453,7 +3505,7 @@
     break;
 
   case 122:
-#line 1210 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1262 "/proj/llvm/llvm-3/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);
@@ -3462,7 +3514,7 @@
     break;
 
   case 123:
-#line 1215 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1267 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {          // Packed array type?
      const llvm::Type* ElemTy = (yyvsp[-1].TypeVal)->get();
      if ((unsigned)(yyvsp[-3].UInt64Val) != (yyvsp[-3].UInt64Val))
@@ -3478,7 +3530,7 @@
     break;
 
   case 124:
-#line 1227 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1279 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {                        // Structure type?
     std::vector<const Type*> Elements;
     for (std::list<llvm::PATypeHolder>::iterator I = (yyvsp[-1].TypeList)->begin(),
@@ -3492,7 +3544,7 @@
     break;
 
   case 125:
-#line 1237 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1289 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {                                  // Empty structure type?
     (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector<const Type*>()));
     CHECK_FOR_ERROR
@@ -3500,7 +3552,7 @@
     break;
 
   case 126:
-#line 1241 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1293 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     std::vector<const Type*> Elements;
     for (std::list<llvm::PATypeHolder>::iterator I = (yyvsp[-2].TypeList)->begin(),
@@ -3514,7 +3566,7 @@
     break;
 
   case 127:
-#line 1251 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1303 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {                         // Empty structure type?
     (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector<const Type*>(), true));
     CHECK_FOR_ERROR
@@ -3522,7 +3574,7 @@
     break;
 
   case 128:
-#line 1258 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1310 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { 
     (yyval.TypeWithAttrs).Ty = (yyvsp[-1].TypeVal); 
     (yyval.TypeWithAttrs).Attrs = (yyvsp[0].ParamAttrs); 
@@ -3530,7 +3582,7 @@
     break;
 
   case 129:
-#line 1265 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1317 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { 
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
@@ -3542,7 +3594,7 @@
     break;
 
   case 130:
-#line 1273 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1325 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.TypeWithAttrs).Ty = new PATypeHolder(Type::VoidTy);
     (yyval.TypeWithAttrs).Attrs = (yyvsp[0].ParamAttrs);
@@ -3550,7 +3602,7 @@
     break;
 
   case 131:
-#line 1279 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1331 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.TypeWithAttrsList) = new TypeWithAttrsList();
     (yyval.TypeWithAttrsList)->push_back((yyvsp[0].TypeWithAttrs));
@@ -3559,7 +3611,7 @@
     break;
 
   case 132:
-#line 1284 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1336 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     ((yyval.TypeWithAttrsList)=(yyvsp[-2].TypeWithAttrsList))->push_back((yyvsp[0].TypeWithAttrs));
     CHECK_FOR_ERROR
@@ -3567,7 +3619,7 @@
     break;
 
   case 134:
-#line 1292 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1344 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.TypeWithAttrsList)=(yyvsp[-2].TypeWithAttrsList);
     TypeWithAttrs TWA; TWA.Attrs = FunctionType::NoAttributeSet;
@@ -3578,7 +3630,7 @@
     break;
 
   case 135:
-#line 1299 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1351 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.TypeWithAttrsList) = new TypeWithAttrsList;
     TypeWithAttrs TWA; TWA.Attrs = FunctionType::NoAttributeSet;
@@ -3589,7 +3641,7 @@
     break;
 
   case 136:
-#line 1306 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1358 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.TypeWithAttrsList) = new TypeWithAttrsList();
     CHECK_FOR_ERROR
@@ -3597,7 +3649,7 @@
     break;
 
   case 137:
-#line 1314 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1366 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.TypeList) = new std::list<PATypeHolder>();
     (yyval.TypeList)->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal);
@@ -3606,7 +3658,7 @@
     break;
 
   case 138:
-#line 1319 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1371 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal);
     CHECK_FOR_ERROR
@@ -3614,7 +3666,7 @@
     break;
 
   case 139:
-#line 1330 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1382 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { // Nonempty unsized arr
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription());
@@ -3646,7 +3698,7 @@
     break;
 
   case 140:
-#line 1358 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1410 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
@@ -3666,7 +3718,7 @@
     break;
 
   case 141:
-#line 1374 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1426 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
@@ -3699,7 +3751,7 @@
     break;
 
   case 142:
-#line 1403 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1455 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { // Nonempty unsized arr
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription());
@@ -3731,7 +3783,7 @@
     break;
 
   case 143:
-#line 1431 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1483 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     const StructType *STy = dyn_cast<StructType>((yyvsp[-3].TypeVal)->get());
     if (STy == 0)
@@ -3756,7 +3808,7 @@
     break;
 
   case 144:
-#line 1452 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1504 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
@@ -3775,7 +3827,7 @@
     break;
 
   case 145:
-#line 1467 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1519 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
@@ -3791,7 +3843,7 @@
     break;
 
   case 146:
-#line 1479 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1531 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
@@ -3802,7 +3854,7 @@
     break;
 
   case 147:
-#line 1486 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1538 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
@@ -3869,7 +3921,7 @@
     break;
 
   case 148:
-#line 1549 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1601 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
@@ -3882,7 +3934,7 @@
     break;
 
   case 149:
-#line 1558 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1610 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
@@ -3896,7 +3948,7 @@
     break;
 
   case 150:
-#line 1568 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1620 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {      // integral constants
     if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val)))
       GEN_ERROR("Constant value doesn't fit in type!");
@@ -3906,7 +3958,7 @@
     break;
 
   case 151:
-#line 1574 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1626 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {      // integral constants
     if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val)))
       GEN_ERROR("Constant value doesn't fit in type!");
@@ -3916,7 +3968,7 @@
     break;
 
   case 152:
-#line 1580 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1632 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {                      // Boolean constants
     (yyval.ConstVal) = ConstantBool::getTrue();
     CHECK_FOR_ERROR
@@ -3924,7 +3976,7 @@
     break;
 
   case 153:
-#line 1584 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1636 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {                     // Boolean constants
     (yyval.ConstVal) = ConstantBool::getFalse();
     CHECK_FOR_ERROR
@@ -3932,7 +3984,7 @@
     break;
 
   case 154:
-#line 1588 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1640 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {                   // Float & Double constants
     if (!ConstantFP::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].FPVal)))
       GEN_ERROR("Floating point constant invalid for type!!");
@@ -3942,7 +3994,7 @@
     break;
 
   case 155:
-#line 1596 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1648 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
@@ -3960,7 +4012,7 @@
     break;
 
   case 156:
-#line 1610 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1662 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!isa<PointerType>((yyvsp[-2].ConstVal)->getType()))
       GEN_ERROR("GetElementPtr requires a pointer operand!");
@@ -3985,7 +4037,7 @@
     break;
 
   case 157:
-#line 1631 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1683 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if ((yyvsp[-5].ConstVal)->getType() != Type::BoolTy)
       GEN_ERROR("Select condition must be of boolean type!");
@@ -3997,7 +4049,7 @@
     break;
 
   case 158:
-#line 1639 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1691 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType())
       GEN_ERROR("Binary operator types must match!");
@@ -4007,7 +4059,7 @@
     break;
 
   case 159:
-#line 1645 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1697 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType())
       GEN_ERROR("Logical operator types must match!");
@@ -4022,7 +4074,7 @@
     break;
 
   case 160:
-#line 1656 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1708 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType())
       GEN_ERROR("icmp operand types must match!");
@@ -4031,7 +4083,7 @@
     break;
 
   case 161:
-#line 1661 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1713 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType())
       GEN_ERROR("fcmp operand types must match!");
@@ -4040,7 +4092,7 @@
     break;
 
   case 162:
-#line 1666 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1718 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if ((yyvsp[-1].ConstVal)->getType() != Type::Int8Ty)
       GEN_ERROR("Shift count for shift constant must be i8 type!");
@@ -4053,7 +4105,7 @@
     break;
 
   case 163:
-#line 1675 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1727 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)))
       GEN_ERROR("Invalid extractelement operands!");
@@ -4063,7 +4115,7 @@
     break;
 
   case 164:
-#line 1681 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1733 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!InsertElementInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)))
       GEN_ERROR("Invalid insertelement operands!");
@@ -4073,7 +4125,7 @@
     break;
 
   case 165:
-#line 1687 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1739 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!ShuffleVectorInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)))
       GEN_ERROR("Invalid shufflevector operands!");
@@ -4083,7 +4135,7 @@
     break;
 
   case 166:
-#line 1696 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1748 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     ((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal));
     CHECK_FOR_ERROR
@@ -4091,7 +4143,7 @@
     break;
 
   case 167:
-#line 1700 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1752 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.ConstVector) = new std::vector<Constant*>();
     (yyval.ConstVector)->push_back((yyvsp[0].ConstVal));
@@ -4100,17 +4152,17 @@
     break;
 
   case 168:
-#line 1708 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1760 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.BoolVal) = false; ;}
     break;
 
   case 169:
-#line 1708 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1760 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.BoolVal) = true; ;}
     break;
 
   case 170:
-#line 1719 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1771 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule;
     CurModule.ModuleDone();
@@ -4119,7 +4171,7 @@
     break;
 
   case 171:
-#line 1724 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1776 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule;
     CurModule.ModuleDone();
@@ -4128,12 +4180,12 @@
     break;
 
   case 174:
-#line 1737 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1789 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { CurFun.isDeclare = false ;}
     break;
 
   case 175:
-#line 1737 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1789 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     CurFun.FunctionDone();
     CHECK_FOR_ERROR
@@ -4141,26 +4193,26 @@
     break;
 
   case 176:
-#line 1741 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1793 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { CurFun.isDeclare = true; ;}
     break;
 
   case 177:
-#line 1741 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1793 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     CHECK_FOR_ERROR
   ;}
     break;
 
   case 178:
-#line 1744 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1796 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     CHECK_FOR_ERROR
   ;}
     break;
 
   case 179:
-#line 1747 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1799 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     // Emit an error if there are any unresolved types left.
     if (!CurModule.LateResolveTypes.empty()) {
@@ -4176,7 +4228,7 @@
     break;
 
   case 180:
-#line 1759 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1811 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription());
@@ -4204,7 +4256,7 @@
     break;
 
   case 181:
-#line 1783 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1835 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     ResolveTypeTo((yyvsp[-2].StrVal), (yyvsp[0].PrimType));
 
@@ -4219,7 +4271,7 @@
     break;
 
   case 182:
-#line 1794 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1846 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { /* "Externally Visible" Linkage */
     if ((yyvsp[0].ConstVal) == 0) 
       GEN_ERROR("Global value initializer is not a constant!");
@@ -4230,14 +4282,14 @@
     break;
 
   case 183:
-#line 1800 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1852 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     CurGV = 0;
   ;}
     break;
 
   case 184:
-#line 1803 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1855 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if ((yyvsp[0].ConstVal) == 0) 
       GEN_ERROR("Global value initializer is not a constant!");
@@ -4247,14 +4299,14 @@
     break;
 
   case 185:
-#line 1808 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1860 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     CurGV = 0;
   ;}
     break;
 
   case 186:
-#line 1811 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1863 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription());
@@ -4265,7 +4317,7 @@
     break;
 
   case 187:
-#line 1817 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1869 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     CurGV = 0;
     CHECK_FOR_ERROR
@@ -4273,21 +4325,21 @@
     break;
 
   case 188:
-#line 1821 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1873 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { 
     CHECK_FOR_ERROR
   ;}
     break;
 
   case 189:
-#line 1824 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1876 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     CHECK_FOR_ERROR
   ;}
     break;
 
   case 190:
-#line 1830 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1882 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
   const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm();
   char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true);
@@ -4303,17 +4355,17 @@
     break;
 
   case 191:
-#line 1843 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1895 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Endianness) = Module::BigEndian; ;}
     break;
 
   case 192:
-#line 1844 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1896 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.Endianness) = Module::LittleEndian; ;}
     break;
 
   case 193:
-#line 1846 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1898 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     CurModule.CurrentModule->setEndianness((yyvsp[0].Endianness));
     CHECK_FOR_ERROR
@@ -4321,7 +4373,7 @@
     break;
 
   case 194:
-#line 1850 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1902 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if ((yyvsp[0].UInt64Val) == 32)
       CurModule.CurrentModule->setPointerSize(Module::Pointer32);
@@ -4334,7 +4386,7 @@
     break;
 
   case 195:
-#line 1859 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1911 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal));
     free((yyvsp[0].StrVal));
@@ -4342,7 +4394,7 @@
     break;
 
   case 196:
-#line 1863 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1915 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal));
     free((yyvsp[0].StrVal));
@@ -4350,7 +4402,7 @@
     break;
 
   case 198:
-#line 1870 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1922 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
           CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal));
           free((yyvsp[0].StrVal));
@@ -4359,7 +4411,7 @@
     break;
 
   case 199:
-#line 1875 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1927 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
           CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal));
           free((yyvsp[0].StrVal));
@@ -4368,19 +4420,19 @@
     break;
 
   case 200:
-#line 1880 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1932 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
           CHECK_FOR_ERROR
         ;}
     break;
 
   case 204:
-#line 1890 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1942 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.StrVal) = 0; ;}
     break;
 
   case 205:
-#line 1892 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1944 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
@@ -4394,7 +4446,7 @@
     break;
 
   case 206:
-#line 1902 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1954 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
@@ -4408,7 +4460,7 @@
     break;
 
   case 207:
-#line 1913 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1965 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.ArgList) = (yyvsp[0].ArgList);
     CHECK_FOR_ERROR
@@ -4416,7 +4468,7 @@
     break;
 
   case 208:
-#line 1917 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1969 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.ArgList) = (yyvsp[-2].ArgList);
     struct ArgListEntry E;
@@ -4429,7 +4481,7 @@
     break;
 
   case 209:
-#line 1926 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1978 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.ArgList) = new ArgListType;
     struct ArgListEntry E;
@@ -4442,7 +4494,7 @@
     break;
 
   case 210:
-#line 1935 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1987 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.ArgList) = 0;
     CHECK_FOR_ERROR
@@ -4450,18 +4502,25 @@
     break;
 
   case 211:
-#line 1941 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 1993 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
   UnEscapeLexed((yyvsp[-5].StrVal));
   std::string FunctionName((yyvsp[-5].StrVal));
   free((yyvsp[-5].StrVal));  // Free strdup'd memory!
   
+  // Check the function result for abstractness if this is a define. We should
+  // have no abstract types at this point
+  if (!CurFun.isDeclare && CurModule.TypeIsUnresolved((yyvsp[-6].TypeWithAttrs).Ty))
+    GEN_ERROR("Reference to abstract result: "+ (yyvsp[-6].TypeWithAttrs).Ty->get()->getDescription());
+
   std::vector<const Type*> ParamTypeList;
   std::vector<FunctionType::ParameterAttributes> ParamAttrs;
   ParamAttrs.push_back((yyvsp[-6].TypeWithAttrs).Attrs);
   if ((yyvsp[-3].ArgList)) {   // If there are arguments...
     for (ArgListType::iterator I = (yyvsp[-3].ArgList)->begin(); I != (yyvsp[-3].ArgList)->end(); ++I) {
       const Type* Ty = I->Ty->get();
+      if (!CurFun.isDeclare && CurModule.TypeIsUnresolved(I->Ty))
+        GEN_ERROR("Reference to abstract argument: " + Ty->getDescription());
       ParamTypeList.push_back(Ty);
       if (Ty != Type::VoidTy)
         ParamAttrs.push_back(I->Attrs);
@@ -4550,7 +4609,7 @@
     break;
 
   case 214:
-#line 2040 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2099 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
   (yyval.FunctionVal) = CurFun.CurrentFunction;
 
@@ -4561,7 +4620,7 @@
     break;
 
   case 217:
-#line 2050 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2109 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
   (yyval.FunctionVal) = (yyvsp[-1].FunctionVal);
   CHECK_FOR_ERROR
@@ -4569,7 +4628,7 @@
     break;
 
   case 218:
-#line 2055 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2114 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     CurFun.CurrentFunction->setLinkage((yyvsp[-1].Linkage));
     (yyval.FunctionVal) = CurFun.CurrentFunction;
@@ -4579,7 +4638,7 @@
     break;
 
   case 219:
-#line 2066 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2125 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.BoolVal) = false;
     CHECK_FOR_ERROR
@@ -4587,7 +4646,7 @@
     break;
 
   case 220:
-#line 2070 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2129 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.BoolVal) = true;
     CHECK_FOR_ERROR
@@ -4595,7 +4654,7 @@
     break;
 
   case 221:
-#line 2075 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2134 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {    // A reference to a direct constant
     (yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val));
     CHECK_FOR_ERROR
@@ -4603,7 +4662,7 @@
     break;
 
   case 222:
-#line 2079 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2138 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val));
     CHECK_FOR_ERROR
@@ -4611,7 +4670,7 @@
     break;
 
   case 223:
-#line 2083 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2142 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {                     // Perhaps it's an FP constant?
     (yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal));
     CHECK_FOR_ERROR
@@ -4619,7 +4678,7 @@
     break;
 
   case 224:
-#line 2087 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2146 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.ValIDVal) = ValID::create(ConstantBool::getTrue());
     CHECK_FOR_ERROR
@@ -4627,7 +4686,7 @@
     break;
 
   case 225:
-#line 2091 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2150 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.ValIDVal) = ValID::create(ConstantBool::getFalse());
     CHECK_FOR_ERROR
@@ -4635,7 +4694,7 @@
     break;
 
   case 226:
-#line 2095 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2154 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.ValIDVal) = ValID::createNull();
     CHECK_FOR_ERROR
@@ -4643,7 +4702,7 @@
     break;
 
   case 227:
-#line 2099 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2158 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.ValIDVal) = ValID::createUndef();
     CHECK_FOR_ERROR
@@ -4651,7 +4710,7 @@
     break;
 
   case 228:
-#line 2103 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2162 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {     // A vector zero constant.
     (yyval.ValIDVal) = ValID::createZeroInit();
     CHECK_FOR_ERROR
@@ -4659,7 +4718,7 @@
     break;
 
   case 229:
-#line 2107 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2166 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { // Nonempty unsized packed vector
     const Type *ETy = (*(yyvsp[-1].ConstVector))[0]->getType();
     int NumElements = (yyvsp[-1].ConstVector)->size(); 
@@ -4688,7 +4747,7 @@
     break;
 
   case 230:
-#line 2132 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2191 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal));
     CHECK_FOR_ERROR
@@ -4696,7 +4755,7 @@
     break;
 
   case 231:
-#line 2136 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2195 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     char *End = UnEscapeLexed((yyvsp[-2].StrVal), true);
     std::string AsmStr = std::string((yyvsp[-2].StrVal), End);
@@ -4710,7 +4769,7 @@
     break;
 
   case 232:
-#line 2150 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2209 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {  // Is it an integer reference...?
     (yyval.ValIDVal) = ValID::create((yyvsp[0].SIntVal));
     CHECK_FOR_ERROR
@@ -4718,7 +4777,7 @@
     break;
 
   case 233:
-#line 2154 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2213 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {                   // Is it a named reference...?
     (yyval.ValIDVal) = ValID::create((yyvsp[0].StrVal));
     CHECK_FOR_ERROR
@@ -4726,7 +4785,7 @@
     break;
 
   case 236:
-#line 2166 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2225 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
@@ -4737,7 +4796,7 @@
     break;
 
   case 237:
-#line 2175 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2234 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.FunctionVal) = (yyvsp[-1].FunctionVal);
     CHECK_FOR_ERROR
@@ -4745,7 +4804,7 @@
     break;
 
   case 238:
-#line 2179 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2238 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { // Do not allow functions with 0 basic blocks   
     (yyval.FunctionVal) = (yyvsp[-1].FunctionVal);
     CHECK_FOR_ERROR
@@ -4753,7 +4812,7 @@
     break;
 
   case 239:
-#line 2188 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2247 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     setValueName((yyvsp[0].TermInstVal), (yyvsp[-1].StrVal));
     CHECK_FOR_ERROR
@@ -4767,7 +4826,7 @@
     break;
 
   case 240:
-#line 2199 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2258 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (CastInst *CI1 = dyn_cast<CastInst>((yyvsp[0].InstVal)))
       if (CastInst *CI2 = dyn_cast<CastInst>(CI1->getOperand(0)))
@@ -4780,7 +4839,7 @@
     break;
 
   case 241:
-#line 2208 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2267 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.BasicBlockVal) = getBBVal(ValID::create((int)CurFun.NextBBNum++), true);
     CHECK_FOR_ERROR
@@ -4796,7 +4855,7 @@
     break;
 
   case 242:
-#line 2220 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2279 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.BasicBlockVal) = getBBVal(ValID::create((yyvsp[0].StrVal)), true);
     CHECK_FOR_ERROR
@@ -4812,7 +4871,7 @@
     break;
 
   case 243:
-#line 2233 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2292 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {              // Return with a result...
     (yyval.TermInstVal) = new ReturnInst((yyvsp[0].ValueVal));
     CHECK_FOR_ERROR
@@ -4820,7 +4879,7 @@
     break;
 
   case 244:
-#line 2237 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2296 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {                                       // Return with no result...
     (yyval.TermInstVal) = new ReturnInst();
     CHECK_FOR_ERROR
@@ -4828,7 +4887,7 @@
     break;
 
   case 245:
-#line 2241 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2300 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {                         // Unconditional Branch...
     BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal));
     CHECK_FOR_ERROR
@@ -4837,7 +4896,7 @@
     break;
 
   case 246:
-#line 2246 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2305 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {  
     BasicBlock* tmpBBA = getBBVal((yyvsp[-3].ValIDVal));
     CHECK_FOR_ERROR
@@ -4850,7 +4909,7 @@
     break;
 
   case 247:
-#line 2255 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2314 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     Value* tmpVal = getVal((yyvsp[-7].PrimType), (yyvsp[-6].ValIDVal));
     CHECK_FOR_ERROR
@@ -4873,7 +4932,7 @@
     break;
 
   case 248:
-#line 2274 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2333 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     Value* tmpVal = getVal((yyvsp[-6].PrimType), (yyvsp[-5].ValIDVal));
     CHECK_FOR_ERROR
@@ -4886,7 +4945,7 @@
     break;
 
   case 249:
-#line 2284 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2343 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
 
     // Handle the short syntax
@@ -4956,7 +5015,7 @@
     break;
 
   case 250:
-#line 2350 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2409 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.TermInstVal) = new UnwindInst();
     CHECK_FOR_ERROR
@@ -4964,7 +5023,7 @@
     break;
 
   case 251:
-#line 2354 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2413 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.TermInstVal) = new UnreachableInst();
     CHECK_FOR_ERROR
@@ -4972,7 +5031,7 @@
     break;
 
   case 252:
-#line 2361 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2420 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.JumpTable) = (yyvsp[-5].JumpTable);
     Constant *V = cast<Constant>(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal)));
@@ -4987,7 +5046,7 @@
     break;
 
   case 253:
-#line 2372 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2431 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.JumpTable) = new std::vector<std::pair<Constant*, BasicBlock*> >();
     Constant *V = cast<Constant>(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal)));
@@ -5003,7 +5062,7 @@
     break;
 
   case 254:
-#line 2385 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2444 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
   // Is this definition named?? if so, assign the name...
   setValueName((yyvsp[0].InstVal), (yyvsp[-1].StrVal));
@@ -5015,7 +5074,7 @@
     break;
 
   case 255:
-#line 2394 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2453 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {    // Used for PHI nodes
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-5].TypeVal))->getDescription());
@@ -5030,7 +5089,7 @@
     break;
 
   case 256:
-#line 2405 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2464 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.PHIList) = (yyvsp[-6].PHIList);
     Value* tmpVal = getVal((yyvsp[-6].PHIList)->front().first->getType(), (yyvsp[-3].ValIDVal));
@@ -5042,7 +5101,7 @@
     break;
 
   case 257:
-#line 2415 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2474 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {    
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
@@ -5054,7 +5113,7 @@
     break;
 
   case 258:
-#line 2423 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2482 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
@@ -5066,17 +5125,17 @@
     break;
 
   case 259:
-#line 2431 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2490 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.ValueRefList) = new ValueRefList(); ;}
     break;
 
   case 260:
-#line 2434 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2493 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     { (yyval.ValueList) = new std::vector<Value*>(); ;}
     break;
 
   case 261:
-#line 2435 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2494 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.ValueList) = (yyvsp[-2].ValueList);
     (yyval.ValueList)->push_back((yyvsp[0].ValueVal));
@@ -5085,7 +5144,7 @@
     break;
 
   case 262:
-#line 2442 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2501 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.BoolVal) = true;
     CHECK_FOR_ERROR
@@ -5093,7 +5152,7 @@
     break;
 
   case 263:
-#line 2446 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2505 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.BoolVal) = false;
     CHECK_FOR_ERROR
@@ -5101,7 +5160,7 @@
     break;
 
   case 264:
-#line 2451 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2510 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription());
@@ -5126,7 +5185,7 @@
     break;
 
   case 265:
-#line 2472 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2531 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription());
@@ -5147,7 +5206,7 @@
     break;
 
   case 266:
-#line 2489 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2548 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription());
@@ -5164,7 +5223,7 @@
     break;
 
   case 267:
-#line 2502 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2561 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription());
@@ -5181,7 +5240,7 @@
     break;
 
   case 268:
-#line 2515 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2574 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     cerr << "WARNING: Use of eliminated 'not' instruction:"
          << " Replacing with 'xor'.\n";
@@ -5198,7 +5257,7 @@
     break;
 
   case 269:
-#line 2528 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2587 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if ((yyvsp[0].ValueVal)->getType() != Type::Int8Ty)
       GEN_ERROR("Shift amount must be i8 type!");
@@ -5211,7 +5270,7 @@
     break;
 
   case 270:
-#line 2537 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2596 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription());
@@ -5228,7 +5287,7 @@
     break;
 
   case 271:
-#line 2550 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2609 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if ((yyvsp[-4].ValueVal)->getType() != Type::BoolTy)
       GEN_ERROR("select condition must be boolean!");
@@ -5240,7 +5299,7 @@
     break;
 
   case 272:
-#line 2558 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2617 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription());
@@ -5251,7 +5310,7 @@
     break;
 
   case 273:
-#line 2565 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2624 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!ExtractElementInst::isValidOperands((yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)))
       GEN_ERROR("Invalid extractelement operands!");
@@ -5261,7 +5320,7 @@
     break;
 
   case 274:
-#line 2571 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2630 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!InsertElementInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)))
       GEN_ERROR("Invalid insertelement operands!");
@@ -5271,7 +5330,7 @@
     break;
 
   case 275:
-#line 2577 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2636 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!ShuffleVectorInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)))
       GEN_ERROR("Invalid shufflevector operands!");
@@ -5281,7 +5340,7 @@
     break;
 
   case 276:
-#line 2583 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2642 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     const Type *Ty = (yyvsp[0].PHIList)->front().first->getType();
     if (!Ty->isFirstClassType())
@@ -5300,7 +5359,7 @@
     break;
 
   case 277:
-#line 2598 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2657 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
 
     // Handle the short syntax
@@ -5366,7 +5425,7 @@
     break;
 
   case 278:
-#line 2660 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2719 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.InstVal) = (yyvsp[0].InstVal);
     CHECK_FOR_ERROR
@@ -5374,7 +5433,7 @@
     break;
 
   case 279:
-#line 2665 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2724 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.BoolVal) = true;
     CHECK_FOR_ERROR
@@ -5382,7 +5441,7 @@
     break;
 
   case 280:
-#line 2669 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2728 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     (yyval.BoolVal) = false;
     CHECK_FOR_ERROR
@@ -5390,7 +5449,7 @@
     break;
 
   case 281:
-#line 2676 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2735 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
@@ -5401,7 +5460,7 @@
     break;
 
   case 282:
-#line 2683 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2742 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-4].TypeVal))->getDescription());
@@ -5413,7 +5472,7 @@
     break;
 
   case 283:
-#line 2691 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2750 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
@@ -5424,7 +5483,7 @@
     break;
 
   case 284:
-#line 2698 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2757 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-4].TypeVal))->getDescription());
@@ -5436,7 +5495,7 @@
     break;
 
   case 285:
-#line 2706 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2765 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!isa<PointerType>((yyvsp[0].ValueVal)->getType()))
       GEN_ERROR("Trying to free nonpointer type " + 
@@ -5447,7 +5506,7 @@
     break;
 
   case 286:
-#line 2714 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2773 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
@@ -5465,7 +5524,7 @@
     break;
 
   case 287:
-#line 2728 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2787 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription());
@@ -5486,7 +5545,7 @@
     break;
 
   case 288:
-#line 2745 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2804 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
     {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription());
@@ -5509,7 +5568,7 @@
     }
 
 /* Line 1126 of yacc.c.  */
-#line 5513 "llvmAsmParser.tab.c"
+#line 5572 "llvmAsmParser.tab.c"
 
   yyvsp -= yylen;
   yyssp -= yylen;
@@ -5777,7 +5836,7 @@
 }
 
 
-#line 2762 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 2821 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
 
 
 // common code from the two 'RunVMAsmParser' functions


Index: llvm/lib/AsmParser/llvmAsmParser.h.cvs
diff -u llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.33 llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.34
--- llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.33	Sat Dec 30 23:40:51 2006
+++ llvm/lib/AsmParser/llvmAsmParser.h.cvs	Tue Jan  2 15:54:12 2007
@@ -301,7 +301,7 @@
 
 
 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 843 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y"
+#line 895 "/proj/llvm/llvm-3/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.42 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.43
--- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.42	Sun Dec 31 15:47:02 2006
+++ llvm/lib/AsmParser/llvmAsmParser.y.cvs	Tue Jan  2 15:54:12 2007
@@ -149,6 +149,58 @@
     }
     return Ret;
   }
+
+  bool TypeIsUnresolved(PATypeHolder* PATy) {
+    // If it isn't abstract, its resolved
+    const Type* Ty = PATy->get();
+    if (!Ty->isAbstract())
+      return false;
+    // Traverse the type looking for abstract types. If it isn't abstract then
+    // we don't need to traverse that leg of the type. 
+    std::vector<const Type*> WorkList, SeenList;
+    WorkList.push_back(Ty);
+    while (!WorkList.empty()) {
+      const Type* Ty = WorkList.back();
+      SeenList.push_back(Ty);
+      WorkList.pop_back();
+      if (const OpaqueType* OpTy = dyn_cast<OpaqueType>(Ty)) {
+        // Check to see if this is an unresolved type
+        std::map<ValID, PATypeHolder>::iterator I = LateResolveTypes.begin();
+        std::map<ValID, PATypeHolder>::iterator E = LateResolveTypes.end();
+        for ( ; I != E; ++I) {
+          if (I->second.get() == OpTy)
+            return true;
+        }
+      } else if (const SequentialType* SeqTy = dyn_cast<SequentialType>(Ty)) {
+        const Type* TheTy = SeqTy->getElementType();
+        if (TheTy->isAbstract() && TheTy != Ty) {
+          std::vector<const Type*>::iterator I = SeenList.begin(), 
+                                             E = SeenList.end();
+          for ( ; I != E; ++I)
+            if (*I == TheTy)
+              break;
+          if (I == E)
+            WorkList.push_back(TheTy);
+        }
+      } else if (const StructType* StrTy = dyn_cast<StructType>(Ty)) {
+        for (unsigned i = 0; i < StrTy->getNumElements(); ++i) {
+          const Type* TheTy = StrTy->getElementType(i);
+          if (TheTy->isAbstract() && TheTy != Ty) {
+            std::vector<const Type*>::iterator I = SeenList.begin(), 
+                                               E = SeenList.end();
+            for ( ; I != E; ++I)
+              if (*I == TheTy)
+                break;
+            if (I == E)
+              WorkList.push_back(TheTy);
+          }
+        }
+      }
+    }
+    return false;
+  }
+
+
 } CurModule;
 
 static struct PerFunctionInfo {
@@ -1943,12 +1995,19 @@
   std::string FunctionName($3);
   free($3);  // Free strdup'd memory!
   
+  // Check the function result for abstractness if this is a define. We should
+  // have no abstract types at this point
+  if (!CurFun.isDeclare && CurModule.TypeIsUnresolved($2.Ty))
+    GEN_ERROR("Reference to abstract result: "+ $2.Ty->get()->getDescription());
+
   std::vector<const Type*> ParamTypeList;
   std::vector<FunctionType::ParameterAttributes> ParamAttrs;
   ParamAttrs.push_back($2.Attrs);
   if ($5) {   // If there are arguments...
     for (ArgListType::iterator I = $5->begin(); I != $5->end(); ++I) {
       const Type* Ty = I->Ty->get();
+      if (!CurFun.isDeclare && CurModule.TypeIsUnresolved(I->Ty))
+        GEN_ERROR("Reference to abstract argument: " + Ty->getDescription());
       ParamTypeList.push_back(Ty);
       if (Ty != Type::VoidTy)
         ParamAttrs.push_back(I->Attrs);






More information about the llvm-commits mailing list