aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2005-10-23 04:37:20 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2005-10-23 04:37:20 +0000
commit66c5fd6c537269eaef0f630fa14360dcaff6a295 (patch)
tree90ec39b9c89faa77f29186419eb3f67def5383b1
parent8b7f14e970d87eb52ac34e443bb508a403a2ac0d (diff)
When a function takes a variable number of pointer arguments, with a zero
pointer marking the end of the list, the zero *must* be cast to the pointer type. An un-cast zero is a 32-bit int, and at least on x86_64, gcc will not extend the zero to 64 bits, thus allowing the upper 32 bits to be random junk. The new END_WITH_NULL macro may be used to annotate a such a function so that GCC (version 4 or newer) will detect the use of un-casted zero at compile time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23888 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--Makefile.rules2
-rw-r--r--examples/Fibonacci/fibonacci.cpp3
-rw-r--r--examples/HowToUseJIT/HowToUseJIT.cpp5
-rw-r--r--examples/ParallelJIT/ParallelJIT.cpp6
-rw-r--r--include/llvm/Module.h4
-rw-r--r--include/llvm/Support/CommandLine.h3
-rw-r--r--include/llvm/Support/DataTypes.h.in6
-rw-r--r--lib/AsmParser/llvmAsmParser.cpp422
-rw-r--r--lib/AsmParser/llvmAsmParser.h8
-rw-r--r--lib/AsmParser/llvmAsmParser.y11
-rw-r--r--lib/Bytecode/Reader/Reader.cpp6
-rw-r--r--lib/Bytecode/Reader/ReaderWrappers.cpp6
-rw-r--r--lib/CodeGen/IntrinsicLowering.cpp3
-rw-r--r--lib/Debugger/UnixLocalInferiorProcess.cpp3
-rw-r--r--lib/Transforms/IPO/LowerSetJmp.cpp15
-rw-r--r--lib/Transforms/IPO/SimplifyLibCalls.cpp5
-rw-r--r--lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp2
-rw-r--r--lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp3
-rw-r--r--lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp3
-rw-r--r--lib/Transforms/Instrumentation/ProfilingUtils.cpp3
-rw-r--r--lib/Transforms/Instrumentation/TraceBasicBlocks.cpp2
-rw-r--r--lib/Transforms/Instrumentation/TraceValues.cpp11
-rw-r--r--lib/Transforms/Scalar/LowerGC.cpp5
-rw-r--r--lib/Transforms/Utils/LowerAllocations.cpp2
-rw-r--r--lib/Transforms/Utils/LowerInvoke.cpp8
-rw-r--r--tools/bugpoint/Miscompilation.cpp2
-rw-r--r--tools/lli/lli.cpp3
27 files changed, 290 insertions, 262 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 4b759e6b49..7898899534 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -221,7 +221,7 @@ else
endif
endif
-CXX.Flags += $(CXXFLAGS)
+CXX.Flags += $(CXXFLAGS) -Wformat
C.Flags += $(CFLAGS)
CPP.Flags += $(CPPFLAGS)
LD.Flags += $(LDFLAGS)
diff --git a/examples/Fibonacci/fibonacci.cpp b/examples/Fibonacci/fibonacci.cpp
index af17d094c3..e9d0136f4f 100644
--- a/examples/Fibonacci/fibonacci.cpp
+++ b/examples/Fibonacci/fibonacci.cpp
@@ -37,7 +37,8 @@ using namespace llvm;
static Function *CreateFibFunction(Module *M) {
// Create the fib function and insert it into module M. This function is said
// to return an int and take an int parameter.
- Function *FibF = M->getOrInsertFunction("fib", Type::IntTy, Type::IntTy, 0);
+ Function *FibF = M->getOrInsertFunction("fib", Type::IntTy, Type::IntTy,
+ (Type *)0);
// Add a basic block to the function.
BasicBlock *BB = new BasicBlock("EntryBlock", FibF);
diff --git a/examples/HowToUseJIT/HowToUseJIT.cpp b/examples/HowToUseJIT/HowToUseJIT.cpp
index 192c76dcce..5ba8a7f1a8 100644
--- a/examples/HowToUseJIT/HowToUseJIT.cpp
+++ b/examples/HowToUseJIT/HowToUseJIT.cpp
@@ -51,7 +51,8 @@ int main() {
// Create the add1 function entry and insert this entry into module M. The
// function will have a return type of "int" and take an argument of "int".
// The '0' terminates the list of argument types.
- Function *Add1F = M->getOrInsertFunction("add1", Type::IntTy, Type::IntTy, 0);
+ Function *Add1F = M->getOrInsertFunction("add1", Type::IntTy, Type::IntTy,
+ (Type *)0);
// Add a basic block to the function. As before, it automatically inserts
// because of the last argument.
@@ -76,7 +77,7 @@ int main() {
// Now we going to create function `foo', which returns an int and takes no
// arguments.
- Function *FooF = M->getOrInsertFunction("foo", Type::IntTy, 0);
+ Function *FooF = M->getOrInsertFunction("foo", Type::IntTy, (Type *)0);
// Add a basic block to the FooF function.
BB = new BasicBlock("EntryBlock", FooF);
diff --git a/examples/ParallelJIT/ParallelJIT.cpp b/examples/ParallelJIT/ParallelJIT.cpp
index 5c605c002e..56ace0322e 100644
--- a/examples/ParallelJIT/ParallelJIT.cpp
+++ b/examples/ParallelJIT/ParallelJIT.cpp
@@ -33,7 +33,8 @@ static Function* createAdd1(Module* M)
// Create the add1 function entry and insert this entry into module M. The
// function will have a return type of "int" and take an argument of "int".
// The '0' terminates the list of argument types.
- Function *Add1F = M->getOrInsertFunction("add1", Type::IntTy, Type::IntTy, 0);
+ Function *Add1F = M->getOrInsertFunction("add1", Type::IntTy, Type::IntTy,
+ (Type *)0);
// Add a basic block to the function. As before, it automatically inserts
// because of the last argument.
@@ -61,7 +62,8 @@ static Function *CreateFibFunction(Module *M)
{
// Create the fib function and insert it into module M. This function is said
// to return an int and take an int parameter.
- Function *FibF = M->getOrInsertFunction("fib", Type::IntTy, Type::IntTy, 0);
+ Function *FibF = M->getOrInsertFunction("fib", Type::IntTy, Type::IntTy,
+ (Type *)0);
// Add a basic block to the function.
BasicBlock *BB = new BasicBlock("EntryBlock", FibF);
diff --git a/include/llvm/Module.h b/include/llvm/Module.h
index d4932fc855..d491c752fd 100644
--- a/include/llvm/Module.h
+++ b/include/llvm/Module.h
@@ -22,6 +22,7 @@
#include "llvm/Function.h"
#include "llvm/GlobalVariable.h"
#include "llvm/ADT/SetVector.h"
+#include "llvm/Support/DataTypes.h"
namespace llvm {
@@ -111,7 +112,8 @@ public:
/// table. If it does not exist, add a prototype for the function and return
/// it. This version of the method takes a null terminated list of function
/// arguments, which makes it easier for clients to use.
- Function *getOrInsertFunction(const std::string &Name, const Type *RetTy,...);
+ Function *getOrInsertFunction(const std::string &Name, const Type *RetTy,...)
+ END_WITH_NULL;
/// getFunction - Look up the specified function in the module symbol table.
/// If it does not exist, return null.
diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h
index 10a2f6c6ab..1d499de9a9 100644
--- a/include/llvm/Support/CommandLine.h
+++ b/include/llvm/Support/CommandLine.h
@@ -21,6 +21,7 @@
#define LLVM_SUPPORT_COMMANDLINE_H
#include "llvm/Support/type_traits.h"
+#include "llvm/Support/DataTypes.h"
#include <string>
#include <vector>
#include <utility>
@@ -335,7 +336,7 @@ public:
template<class DataType>
ValuesClass<DataType> values(const char *Arg, DataType Val, const char *Desc,
- ...) {
+ ...) END_WITH_NULL {
va_list ValueArgs;
va_start(ValueArgs, Desc);
ValuesClass<DataType> Vals(Arg, Val, Desc, ValueArgs);
diff --git a/include/llvm/Support/DataTypes.h.in b/include/llvm/Support/DataTypes.h.in
index b99739dc4e..cfec5f3862 100644
--- a/include/llvm/Support/DataTypes.h.in
+++ b/include/llvm/Support/DataTypes.h.in
@@ -98,4 +98,10 @@ typedef signed int ssize_t;
# define UINT64_MAX 0xffffffffffffffffULL
#endif
+#if __GNUC__ > 3
+#define END_WITH_NULL __attribute__((sentinel))
+#else
+#define END_WITH_NULL
+#endif
+
#endif /* SUPPORT_DATATYPES_H */
diff --git a/lib/AsmParser/llvmAsmParser.cpp b/lib/AsmParser/llvmAsmParser.cpp
index cfae201fd4..92e0a39462 100644
--- a/lib/AsmParser/llvmAsmParser.cpp
+++ b/lib/AsmParser/llvmAsmParser.cpp
@@ -1,7 +1,7 @@
-/* A Bison parser, made by GNU Bison 1.875c. */
+/* A Bison parser, made by GNU Bison 1.875d. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -251,7 +251,7 @@
/* Copy the first part of user declarations. */
-#line 14 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 14 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
#include "ParserInternals.h"
#include "llvm/CallingConv.h"
@@ -1007,7 +1007,7 @@ static PATypeHolder HandleUpRefs(const Type *ty) {
const Type* ArgTy = F->getFunctionType()->getReturnType();
const Type* ArgTyPtr = PointerType::get(ArgTy);
Function* NF = Result->getOrInsertFunction("llvm.va_start",
- RetTy, ArgTyPtr, 0);
+ RetTy, ArgTyPtr, (Type *)0);
while (!F->use_empty()) {
CallInst* CI = cast<CallInst>(F->use_back());
@@ -1032,7 +1032,7 @@ static PATypeHolder HandleUpRefs(const Type *ty) {
const Type* ArgTy = F->getFunctionType()->getParamType(0);
const Type* ArgTyPtr = PointerType::get(ArgTy);
Function* NF = Result->getOrInsertFunction("llvm.va_end",
- RetTy, ArgTyPtr, 0);
+ RetTy, ArgTyPtr, (Type *)0);
while (!F->use_empty()) {
CallInst* CI = cast<CallInst>(F->use_back());
@@ -1059,7 +1059,8 @@ static PATypeHolder HandleUpRefs(const Type *ty) {
const Type* ArgTy = F->getFunctionType()->getReturnType();
const Type* ArgTyPtr = PointerType::get(ArgTy);
Function* NF = Result->getOrInsertFunction("llvm.va_copy",
- RetTy, ArgTyPtr, ArgTyPtr, 0);
+ RetTy, ArgTyPtr, ArgTyPtr,
+ (Type *)0);
while (!F->use_empty()) {
CallInst* CI = cast<CallInst>(F->use_back());
@@ -1117,7 +1118,7 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) {
#endif
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 865 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 866 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
typedef union YYSTYPE {
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
@@ -1158,7 +1159,7 @@ typedef union YYSTYPE {
llvm::Module::Endianness Endianness;
} YYSTYPE;
/* Line 191 of yacc.c. */
-#line 1162 "llvmAsmParser.tab.c"
+#line 1163 "llvmAsmParser.tab.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
@@ -1170,7 +1171,7 @@ typedef union YYSTYPE {
/* Line 214 of yacc.c. */
-#line 1174 "llvmAsmParser.tab.c"
+#line 1175 "llvmAsmParser.tab.c"
#if ! defined (yyoverflow) || YYERROR_VERBOSE
@@ -1218,7 +1219,7 @@ typedef union YYSTYPE {
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- short yyss;
+ short int yyss;
YYSTYPE yyvs;
};
@@ -1228,7 +1229,7 @@ union yyalloc
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
@@ -1270,7 +1271,7 @@ union yyalloc
#if defined (__STDC__) || defined (__cplusplus)
typedef signed char yysigned_char;
#else
- typedef short yysigned_char;
+ typedef short int yysigned_char;
#endif
/* YYFINAL -- State number of the termination state. */
@@ -1337,7 +1338,7 @@ static const unsigned char yytranslate[] =
#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
-static const unsigned short yyprhs[] =
+static const unsigned short int yyprhs[] =
{
0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
@@ -1364,7 +1365,7 @@ static const unsigned short yyprhs[] =
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const short yyrhs[] =
+static const short int yyrhs[] =
{
133, 0, -1, 5, -1, 6, -1, 3, -1, 4,
-1, 66, -1, 67, -1, 68, -1, 69, -1, 70,
@@ -1437,30 +1438,30 @@ static const short yyrhs[] =
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const unsigned short yyrline[] =
+static const unsigned short int yyrline[] =
{
- 0, 982, 982, 983, 990, 991, 1000, 1000, 1000, 1000,
- 1000, 1001, 1001, 1001, 1002, 1002, 1002, 1002, 1002, 1002,
- 1004, 1004, 1008, 1008, 1008, 1008, 1009, 1009, 1009, 1009,
- 1010, 1010, 1011, 1011, 1014, 1017, 1021, 1022, 1023, 1024,
- 1025, 1027, 1028, 1029, 1030, 1031, 1044, 1044, 1045, 1045,
- 1047, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1057, 1057,
- 1057, 1057, 1057, 1057, 1058, 1061, 1064, 1070, 1077, 1089,
- 1093, 1104, 1113, 1116, 1124, 1128, 1133, 1134, 1137, 1140,
- 1150, 1175, 1188, 1216, 1241, 1261, 1273, 1282, 1286, 1345,
- 1351, 1359, 1364, 1369, 1372, 1375, 1382, 1392, 1423, 1430,
- 1451, 1458, 1463, 1473, 1476, 1483, 1483, 1493, 1500, 1504,
- 1507, 1510, 1523, 1543, 1545, 1549, 1553, 1555, 1557, 1562,
- 1563, 1565, 1568, 1576, 1581, 1583, 1587, 1591, 1599, 1599,
- 1600, 1600, 1602, 1608, 1613, 1619, 1622, 1627, 1631, 1635,
- 1715, 1715, 1717, 1725, 1725, 1727, 1731, 1731, 1740, 1743,
- 1746, 1749, 1752, 1755, 1758, 1761, 1785, 1792, 1795, 1800,
- 1800, 1806, 1810, 1813, 1821, 1830, 1834, 1844, 1855, 1858,
- 1861, 1864, 1867, 1881, 1885, 1938, 1941, 1947, 1955, 1965,
- 1972, 1977, 1984, 1988, 1994, 1994, 1996, 1999, 2005, 2017,
- 2025, 2035, 2047, 2054, 2061, 2068, 2073, 2092, 2114, 2128,
- 2185, 2191, 2193, 2197, 2200, 2206, 2210, 2214, 2218, 2222,
- 2229, 2239, 2252
+ 0, 983, 983, 984, 991, 992, 1001, 1001, 1001, 1001,
+ 1001, 1002, 1002, 1002, 1003, 1003, 1003, 1003, 1003, 1003,
+ 1005, 1005, 1009, 1009, 1009, 1009, 1010, 1010, 1010, 1010,
+ 1011, 1011, 1012, 1012, 1015, 1018, 1022, 1023, 1024, 1025,
+ 1026, 1028, 1029, 1030, 1031, 1032, 1045, 1045, 1046, 1046,
+ 1048, 1057, 1057, 1057, 1057, 1057, 1057, 1057, 1058, 1058,
+ 1058, 1058, 1058, 1058, 1059, 1062, 1065, 1071, 1078, 1090,
+ 1094, 1105, 1114, 1117, 1125, 1129, 1134, 1135, 1138, 1141,
+ 1151, 1176, 1189, 1217, 1242, 1262, 1274, 1283, 1287, 1346,
+ 1352, 1360, 1365, 1370, 1373, 1376, 1383, 1393, 1424, 1431,
+ 1452, 1459, 1464, 1474, 1477, 1484, 1484, 1494, 1501, 1505,
+ 1508, 1511, 1524, 1544, 1546, 1550, 1554, 1556, 1558, 1563,
+ 1564, 1566, 1569, 1577, 1582, 1584, 1588, 1592, 1600, 1600,
+ 1601, 1601, 1603, 1609, 1614, 1620, 1623, 1628, 1632, 1636,
+ 1716, 1716, 1718, 1726, 1726, 1728, 1732, 1732, 1741, 1744,
+ 1747, 1750, 1753, 1756, 1759, 1762, 1786, 1793, 1796, 1801,
+ 1801, 1807, 1811, 1814, 1822, 1831, 1835, 1845, 1856, 1859,
+ 1862, 1865, 1868, 1882, 1886, 1939, 1942, 1948, 1956, 1966,
+ 1973, 1978, 1985, 1989, 1995, 1995, 1997, 2000, 2006, 2018,
+ 2026, 2036, 2048, 2055, 2062, 2069, 2074, 2093, 2115, 2129,
+ 2186, 2192, 2194, 2198, 2201, 2207, 2211, 2215, 2219, 2223,
+ 2230, 2240, 2253
};
#endif
@@ -1503,7 +1504,7 @@ static const char *const yytname[] =
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
-static const unsigned short yytoknum[] =
+static const unsigned short int yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
@@ -1623,7 +1624,7 @@ static const unsigned char yydefact[] =
};
/* YYDEFGOTO[NTERM-NUM]. */
-static const short yydefgoto[] =
+static const short int yydefgoto[] =
{
-1, 69, 222, 235, 236, 237, 238, 166, 167, 196,
168, 20, 11, 28, 70, 71, 169, 73, 74, 98,
@@ -1637,7 +1638,7 @@ static const short yydefgoto[] =
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#define YYPACT_NINF -383
-static const short yypact[] =
+static const short int yypact[] =
{
-383, 48, 136, 517, -383, -383, -383, -383, -383, -383,
-383, 27, 36, -383, -383, -17, -383, -383, 46, -21,
@@ -1684,7 +1685,7 @@ static const short yypact[] =
};
/* YYPGOTO[NTERM-NUM]. */
-static const short yypgoto[] =
+static const short int yypgoto[] =
{
-383, -383, -383, 254, 262, 264, 272, -106, -105, -372,
-383, 313, 333, -101, -38, -383, -28, -383, -56, 255,
@@ -1700,7 +1701,7 @@ static const short yypgoto[] =
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -108
-static const short yytable[] =
+static const short int yytable[] =
{
72, 170, 194, 195, 87, 77, 30, 21, 197, 291,
293, 397, 97, 33, 72, 403, 299, 42, 216, 88,
@@ -1815,7 +1816,7 @@ static const short yytable[] =
67, 0, 68
};
-static const short yycheck[] =
+static const short int yycheck[] =
{
28, 91, 108, 108, 42, 29, 23, 3, 109, 232,
233, 383, 68, 30, 42, 397, 100, 20, 100, 32,
@@ -2089,12 +2090,12 @@ do { \
#if defined (__STDC__) || defined (__cplusplus)
static void
-yy_stack_print (short *bottom, short *top)
+yy_stack_print (short int *bottom, short int *top)
#else
static void
yy_stack_print (bottom, top)
- short *bottom;
- short *top;
+ short int *bottom;
+ short int *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
@@ -2361,9 +2362,9 @@ yyparse ()
to reallocate them elsewhere. */
/* The state stack. */
- short yyssa[YYINITDEPTH];
- short *yyss = yyssa;
- register short *yyssp;
+ short int yyssa[YYINITDEPTH];
+ short int *yyss = yyssa;
+ register short int *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
@@ -2400,6 +2401,7 @@ yyparse ()
yyssp = yyss;
yyvsp = yyvs;
+
goto yysetstate;
/*------------------------------------------------------------.
@@ -2425,7 +2427,7 @@ yyparse ()
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
+ short int *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
@@ -2453,7 +2455,7 @@ yyparse ()
yystacksize = YYMAXDEPTH;
{
- short *yyss1 = yyss;
+ short int *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
@@ -2586,7 +2588,7 @@ yyreduce:
switch (yyn)
{
case 3:
-#line 983 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 984 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
if (yyvsp[0].UIntVal > (uint32_t)INT32_MAX) // Outside of my range!
ThrowException("Value too large for type!");
@@ -2595,7 +2597,7 @@ yyreduce:
break;
case 5:
-#line 991 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 992 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
if (yyvsp[0].UInt64Val > (uint64_t)INT64_MAX) // Outside of my range!
ThrowException("Value too large for type!");
@@ -2604,66 +2606,66 @@ yyreduce:
break;
case 34:
-#line 1014 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1015 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
yyval.StrVal = yyvsp[-1].StrVal;
;}
break;
case 35:
-#line 1017 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1018 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
yyval.StrVal = 0;
;}
break;
case 36:
-#line 1021 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1022 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::InternalLinkage; ;}
break;
case 37:
-#line 1022 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1023 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::LinkOnceLinkage; ;}
break;
case 38:
-#line 1023 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1024 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::WeakLinkage; ;}
break;
case 39:
-#line 1024 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1025 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::AppendingLinkage; ;}
break;
case 40:
-#line 1025 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1026 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ yyval.Linkage = GlobalValue::ExternalLinkage; ;}
break;
case 41:
-#line 1027 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1028 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ yyval.UIntVal = CallingConv::C; ;}
break;
case 42:
-#line 1028 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1029 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ yyval.UIntVal = CallingConv::C; ;}
break;
case 43:
-#line 1029 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1030 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ yyval.UIntVal = CallingConv::Fast; ;}
break;
case 44:
-#line 1030 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1031 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ yyval.UIntVal = CallingConv::Cold; ;}
break;
case 45:
-#line 1031 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1032 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
if ((unsigned)yyvsp[0].UInt64Val != yyvsp[0].UInt64Val)
ThrowException("Calling conv too large!");
@@ -2672,17 +2674,17 @@ yyreduce:
break;
case 47:
-#line 1044 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1045 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ;}
break;
case 49:
-#line 1045 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1046 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ;}
break;
case 50:
-#line 1047 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1048 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
if (!UpRefs.empty())
ThrowException("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription());
@@ -2691,28 +2693,28 @@ yyreduce:
break;
case 64:
-#line 1058 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1059 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
yyval.TypeVal = new PATypeHolder(OpaqueType::get());
;}
break;
case 65:
-#line 1061 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1062 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType);
;}
break;
case 66:
-#line 1064 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1065 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ // Named types are also simple types...
yyval.TypeVal = new PATypeHolder(getTypeVal(yyvsp[0].ValIDVal));
;}
break;
case 67:
-#line 1070 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1071 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ // Type UpReference
if (yyvsp[0].UInt64Val > (uint64_t)~0U) ThrowException("Value out of range!");
OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder
@@ -2723,7 +2725,7 @@ yyreduce:
break;
case 68:
-#line 1077 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1078 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ // Function derived type?
std::vector<const Type*> Params;
for (std::list<llvm::PATypeHolder>::iterator I = yyvsp[-1].TypeList->begin(),
@@ -2739,7 +2741,7 @@ yyreduce:
break;
case 69:
-#line 1089 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1090 "/usr/home/llvm/obj/../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;
@@ -2747,7 +2749,7 @@ yyreduce:
break;
case 70:
-#line 1093 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1094 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ // Packed array type?
const llvm::Type* ElemTy = yyvsp[-1].TypeVal->get();
if ((unsigned)yyvsp[-3].UInt64Val != yyvsp[-3].UInt64Val) {
@@ -2762,7 +2764,7 @@ yyreduce:
break;
case 71:
-#line 1104 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1105 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ // Structure type?
std::vector<const Type*> Elements;
for (std::list<llvm::PATypeHolder>::iterator I = yyvsp[-1].TypeList->begin(),
@@ -2775,14 +2777,14 @@ yyreduce:
break;
case 72:
-#line 1113 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1114 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ // Empty structure type?
yyval.TypeVal = new PATypeHolder(StructType::get(std::vector<const Type*>()));
;}
break;
case 73:
-#line 1116 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1117 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ // Pointer type?
yyval.TypeVal = new PATypeHolder(HandleUpRefs(PointerType::get(*yyvsp[-1].TypeVal)));
delete yyvsp[-1].TypeVal;
@@ -2790,7 +2792,7 @@ yyreduce:
break;
case 74:
-#line 1124 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1125 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
yyval.TypeList = new std::list<PATypeHolder>();
yyval.TypeList->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal;
@@ -2798,35 +2800,35 @@ yyreduce:
break;
case 75:
-#line 1128 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1129 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeList=yyvsp[-2].TypeList)->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal;
;}
break;
case 77:
-#line 1134 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1135 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeList=yyvsp[-2].TypeList)->push_back(Type::VoidTy);
;}
break;
case 78:
-#line 1137 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1138 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
(yyval.TypeList = new std::list<PATypeHolder>())->push_back(Type::VoidTy);
;}
break;
case 79:
-#line 1140 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1141 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
yyval.TypeList = new std::list<PATypeHolder>();
;}
break;
case 80:
-#line 1150 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1151 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ // Nonempty unsized arr
const ArrayType *ATy = dyn_cast<ArrayType>(yyvsp[-3].TypeVal->get());
if (ATy == 0)
@@ -2855,7 +2857,7 @@ yyreduce:
break;
case 81:
-#line 1175 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1176 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
const ArrayType *ATy = dyn_cast<ArrayType>(yyvsp[-2].TypeVal->get());
if (ATy == 0)
@@ -2872,7 +2874,7 @@ yyreduce:
break;
case 82:
-#line 1188 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1189 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
const ArrayType *ATy = dyn_cast<ArrayType>(yyvsp[-2].TypeVal->get());
if (ATy == 0)
@@ -2904,7 +2906,7 @@ yyreduce:
break;
case 83:
-#line 1216 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1217 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{ // Nonempty unsized arr
const PackedType *PTy = dyn_cast<PackedType>(yyvsp[-3].TypeVal->get());
if (PTy == 0)
@@ -2933,7 +2935,7 @@ yyreduce:
break;
case 84:
-#line 1241 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1242 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
const StructType *STy = dyn_cast<StructType>(yyvsp[-3].TypeVal->get());
if (STy == 0)
@@ -2957,7 +2959,7 @@ yyreduce:
break;
case 85:
-#line 1261 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1262 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
const StructType *STy = dyn_cast<StructType>(yyvsp[-2].TypeVal->get());
if (STy == 0)
@@ -2973,7 +2975,7 @@ yyreduce:
break;
case 86:
-#line 1273 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1274 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
const PointerType *PTy = dyn_cast<PointerType>(yyvsp[-1].TypeVal->get());
if (PTy == 0)
@@ -2986,7 +2988,7 @@ yyreduce:
break;
case 87:
-#line 1282 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1283 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
yyval.ConstVal = UndefValue::get(yyvsp[-1].TypeVal->get());
delete yyvsp[-1].TypeVal;
@@ -2994,7 +2996,7 @@ yyreduce:
break;
case 88:
-#line 1286 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1287 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
const PointerType *Ty = dyn_cast<PointerType>(yyvsp[-1].TypeVal->get());
if (Ty == 0)
@@ -3057,7 +3059,7 @@ yyreduce:
break;
case 89:
-#line 1345 "/proj/llvm/build/../llvm/lib/AsmParser/llvmAsmParser.y"
+#line 1346 "/usr/home/llvm/obj/../lib/AsmParser/llvmAsmParser.y"
{
if (yyvsp[-1].TypeVal->get() != yyvsp[0].ConstVal->getType())
ThrowException("Mismatched types for constant expression!");
@@ -3067,7 +3069,7 @@ yyreduce:
break;
ca