First version of llvm-upgrade that can correctly upgrade a large test

case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32089 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2006-12-01 20:26:20 +00:00
parent 102e2d3c82
commit e77e35e8b1
13 changed files with 4588 additions and 3787 deletions

View File

@ -19,5 +19,12 @@ include $(LEVEL)/Makefile.common
# header file it needs is built.
$(ObjDir)/upgradeLexer.o: $(PROJ_SRC_DIR)/UpgradeParser.h
TESTCASE=../../test/Regression/Assembler/2004-09-29-VerifierIsReallySlow.llx
test:
../../Debug/bin/llvm-upgrade -o - ../../test/Feature/basictest.ll
llvm-as $(TESTCASE) -o - | llvm-dis -o source.ll -f
../../Debug/bin/llvm-upgrade -o - $(TESTCASE) 2>err.out | llvm-as | \
llvm-dis > upgrade.ll -f
diff source.ll upgrade.ll > diff.out
$(PROJ_SRC_DIR)/UpgradeParser.h: $(PROJ_SRC_DIR)/UpgradeParser.y
$(PROJ_SRC_DIR)/UpgradeParser.cpp: $(PROJ_SRC_DIR)/UpgradeParser.y

View File

@ -26,12 +26,88 @@ extern int Upgradelineno;
extern std::istream* LexInput;
void UpgradeAssembly(const std::string & infile, std::istream& in, std::ostream &out);
void UpgradeAssembly(
const std::string & infile, std::istream& in, std::ostream &out, bool debug);
// Globals exported by the parser...
extern char* Upgradetext;
extern int Upgradeleng;
extern unsigned SizeOfPointer;
int yyerror(const char *ErrorMsg) ;
/// This enum is used to keep track of the original (1.9) type used to form
/// a type. These are needed for type upgrades and to determine how to upgrade
/// signed instructions with signless operands.
enum Types {
BoolTy, SByteTy, UByteTy, ShortTy, UShortTy, IntTy, UIntTy, LongTy, ULongTy,
FloatTy, DoubleTy, PointerTy, PackedTy, ArrayTy, StructTy, OpaqueTy, VoidTy,
LabelTy, FunctionTy
};
/// This type is used to keep track of the signedness of the obsolete
/// integer types. Instead of creating an llvm::Type directly, the Lexer will
/// create instances of TypeInfo which retains the signedness indication so
/// it can be used by the parser for upgrade decisions.
/// For example if "uint" is encountered then the "first" field will be set
/// to "int32" and the "second" field will be set to "isUnsigned". If the
/// type is not obsolete then "second" will be set to "isSignless".
struct TypeInfo {
std::string* newTy;
Types oldTy;
void destroy() { delete newTy; }
bool isSigned() {
return oldTy == SByteTy || oldTy == ShortTy ||
oldTy == IntTy || oldTy == LongTy;
}
bool isUnsigned() {
return oldTy == UByteTy || oldTy == UShortTy ||
oldTy == UIntTy || oldTy == ULongTy;
}
bool isSignless() { return !isSigned() && !isUnsigned(); }
bool isInteger() { return isSigned() || isUnsigned(); }
bool isIntegral() { return oldTy == BoolTy || isInteger(); }
bool isFloatingPoint() { return oldTy == DoubleTy || oldTy == FloatTy; }
bool isPacked() { return oldTy == PackedTy; }
bool isPointer() { return oldTy == PointerTy; }
bool isOther() { return !isPacked() && !isPointer() && !isFloatingPoint()
&& !isIntegral(); }
unsigned getBitWidth() {
switch (oldTy) {
case LabelTy:
case VoidTy : return 0;
case BoolTy : return 1;
case SByteTy: case UByteTy : return 8;
case ShortTy: case UShortTy : return 16;
case IntTy: case UIntTy: case FloatTy: return 32;
case LongTy: case ULongTy: case DoubleTy : return 64;
case PointerTy: return SizeOfPointer; // global var
default:
return 128; /// Struct/Packed/Array --> doesn't matter
}
}
};
/// This type is used to keep track of the signedness of values. Instead
/// of creating llvm::Value directly, the parser will create ValueInfo which
/// associates a Value* with a Signedness indication.
struct ValueInfo {
std::string* val;
TypeInfo type;
void destroy() { delete val; type.destroy(); }
};
/// This type is used to keep track of the signedness of constants.
struct ConstInfo {
std::string *cnst;
TypeInfo type;
void destroy() { delete cnst; type.destroy(); }
};
#endif

View File

@ -334,11 +334,11 @@ static yyconst short int yy_acclist[194] =
62, 80, 67, 88, 84, 61, 73, 105, 112, 112,
86, 46, 81, 82, 66, 96, 70, 97, 53, 85,
21, 109, 65, 69, 23, 4, 58, 64, 52, 68,
21, 109, 65, 69, 23, 4, 59, 64, 52, 68,
45, 11, 112, 33, 2, 5, 55, 57, 47, 75,
79, 77, 78, 76, 74, 49, 98, 48, 54, 20,
95, 42, 56, 27, 41, 7, 91, 30, 94, 35,
59, 83, 90, 24, 25, 92, 50, 87, 40, 6,
58, 83, 90, 24, 25, 92, 50, 87, 40, 6,
26, 34, 8, 16, 9, 10, 32, 12, 14, 13,
29, 37, 15, 28, 93, 99, 101, 102, 43, 100,
17, 44, 18
@ -858,17 +858,10 @@ char *yytext;
#line 28 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#include "ParserInternals.h"
#define YYSTYPE std::string*
#include "UpgradeParser.h"
#include <cctype>
#include <cstdlib>
static void trim(std::string& str) {
size_t startpos = str.find_first_not_of(" \t\n\r",0);
if (startpos != std::string::npos)
str.erase(0,startpos);
}
#define YY_INPUT(buf,result,max_size) \
{ \
if (LexInput->good() && !LexInput->eof()) { \
@ -882,8 +875,12 @@ static void trim(std::string& str) {
// Construct a token value for a non-obsolete token
#define RET_TOK(sym) \
Upgradelval = new std::string(yytext); \
trim(*Upgradelval); \
Upgradelval.String = new std::string(yytext); \
return sym
#define RET_TY(sym,OldTY,NewTY,sign) \
Upgradelval.Type.newTy = new std::string(NewTY); \
Upgradelval.Type.oldTy = OldTY; \
return sym
#define YY_NEVER_INTERACTIVE 1
@ -903,7 +900,7 @@ static void trim(std::string& str) {
/* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
* it to deal with 64 bit numbers.
*/
#line 907 "UpgradeLexer.cpp"
#line 904 "UpgradeLexer.cpp"
/* Macros after this point can all be overridden by user definitions in
* section 1.
@ -1054,10 +1051,10 @@ YY_DECL
register char *yy_cp = NULL, *yy_bp = NULL;
register int yy_act;
#line 101 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 98 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 1061 "UpgradeLexer.cpp"
#line 1058 "UpgradeLexer.cpp"
if ( yy_init )
{
@ -1150,571 +1147,571 @@ do_action: /* This label is used only to access EOF actions. */
{ /* beginning of action switch */
case 1:
YY_RULE_SETUP
#line 103 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 100 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ /* Ignore comments for now */ }
YY_BREAK
case 2:
YY_RULE_SETUP
#line 105 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 102 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( BEGINTOK); }
YY_BREAK
case 3:
YY_RULE_SETUP
#line 106 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 103 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ENDTOK); }
YY_BREAK
case 4:
YY_RULE_SETUP
#line 107 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 104 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( TRUETOK); }
YY_BREAK
case 5:
YY_RULE_SETUP
#line 108 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 105 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( FALSETOK); }
YY_BREAK
case 6:
YY_RULE_SETUP
#line 109 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 106 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( DECLARE); }
YY_BREAK
case 7:
YY_RULE_SETUP
#line 110 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 107 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( GLOBAL); }
YY_BREAK
case 8:
YY_RULE_SETUP
#line 111 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 108 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( CONSTANT); }
YY_BREAK
case 9:
YY_RULE_SETUP
#line 112 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 109 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( INTERNAL); }
YY_BREAK
case 10:
YY_RULE_SETUP
#line 113 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 110 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( LINKONCE); }
YY_BREAK
case 11:
YY_RULE_SETUP
#line 114 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 111 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( WEAK); }
YY_BREAK
case 12:
YY_RULE_SETUP
#line 115 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 112 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( APPENDING); }
YY_BREAK
case 13:
YY_RULE_SETUP
#line 116 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 113 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( DLLIMPORT); }
YY_BREAK
case 14:
YY_RULE_SETUP
#line 117 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 114 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( DLLEXPORT); }
YY_BREAK
case 15:
YY_RULE_SETUP
#line 118 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 115 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( EXTERN_WEAK); }
YY_BREAK
case 16:
YY_RULE_SETUP
#line 119 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 116 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( EXTERNAL); }
YY_BREAK
case 17:
YY_RULE_SETUP
#line 120 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 117 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( IMPLEMENTATION); }
YY_BREAK
case 18:
YY_RULE_SETUP
#line 121 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 118 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ZEROINITIALIZER); }
YY_BREAK
case 19:
YY_RULE_SETUP
#line 122 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 119 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( DOTDOTDOT); }
YY_BREAK
case 20:
YY_RULE_SETUP
#line 123 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 120 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UNDEF); }
YY_BREAK
case 21:
YY_RULE_SETUP
#line 124 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 121 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( NULL_TOK); }
YY_BREAK
case 22:
YY_RULE_SETUP
#line 125 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 122 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( TO); }
YY_BREAK
case 23:
YY_RULE_SETUP
#line 126 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 123 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( TAIL); }
YY_BREAK
case 24:
YY_RULE_SETUP
#line 127 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 124 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( TARGET); }
YY_BREAK
case 25:
YY_RULE_SETUP
#line 128 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 125 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( TRIPLE); }
YY_BREAK
case 26:
YY_RULE_SETUP
#line 129 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 126 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( DEPLIBS); }
YY_BREAK
case 27:
YY_RULE_SETUP
#line 130 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 127 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ENDIAN); }
YY_BREAK
case 28:
YY_RULE_SETUP
#line 131 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 128 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( POINTERSIZE); }
YY_BREAK
case 29:
YY_RULE_SETUP
#line 132 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 129 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( DATALAYOUT); }
YY_BREAK
case 30:
YY_RULE_SETUP
#line 133 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 130 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( LITTLE); }
YY_BREAK
case 31:
YY_RULE_SETUP
#line 134 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 131 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( BIG); }
YY_BREAK
case 32:
YY_RULE_SETUP
#line 135 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 132 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( VOLATILE); }
YY_BREAK
case 33:
YY_RULE_SETUP
#line 136 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 133 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ALIGN); }
YY_BREAK
case 34:
YY_RULE_SETUP
#line 137 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 134 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SECTION); }
YY_BREAK
case 35:
YY_RULE_SETUP
#line 138 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 135 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( MODULE); }
YY_BREAK
case 36:
YY_RULE_SETUP
#line 139 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 136 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ASM_TOK); }
YY_BREAK
case 37:
YY_RULE_SETUP
#line 140 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 137 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SIDEEFFECT); }
YY_BREAK
case 38:
YY_RULE_SETUP
#line 142 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 139 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( CC_TOK); }
YY_BREAK
case 39:
YY_RULE_SETUP
#line 143 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 140 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( CCC_TOK); }
YY_BREAK
case 40:
YY_RULE_SETUP
#line 144 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 141 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( CSRETCC_TOK); }
YY_BREAK
case 41:
YY_RULE_SETUP
#line 145 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 142 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( FASTCC_TOK); }
YY_BREAK
case 42:
YY_RULE_SETUP
#line 146 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 143 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( COLDCC_TOK); }
YY_BREAK
case 43:
YY_RULE_SETUP
#line 147 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 144 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( X86_STDCALLCC_TOK); }
YY_BREAK
case 44:
YY_RULE_SETUP
#line 148 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 145 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( X86_FASTCALLCC_TOK); }
YY_BREAK
case 45:
YY_RULE_SETUP
#line 150 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( VOID); }
#line 147 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(VOID,VoidTy,"void",false); }
YY_BREAK
case 46:
YY_RULE_SETUP
#line 151 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( BOOL); }
#line 148 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(BOOL,BoolTy,"bool",false); }
YY_BREAK
case 47:
YY_RULE_SETUP
#line 152 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SBYTE); }
#line 149 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(SBYTE,SByteTy,"sbyte",true); }
YY_BREAK
case 48:
YY_RULE_SETUP
#line 153 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UBYTE); }
#line 150 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(UBYTE,UByteTy,"ubyte",false); }
YY_BREAK
case 49:
YY_RULE_SETUP
#line 154 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SHORT); }
#line 151 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(SHORT,ShortTy,"short",true); }
YY_BREAK
case 50:
YY_RULE_SETUP
#line 155 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( USHORT); }
#line 152 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(USHORT,UShortTy,"ushort",false); }
YY_BREAK
case 51:
YY_RULE_SETUP
#line 156 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( INT); }
#line 153 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(INT,IntTy,"int",true); }
YY_BREAK
case 52:
YY_RULE_SETUP
#line 157 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UINT); }
#line 154 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(UINT,UIntTy,"uint",false); }
YY_BREAK
case 53:
YY_RULE_SETUP
#line 158 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( LONG); }
#line 155 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(LONG,LongTy,"long",true); }
YY_BREAK
case 54:
YY_RULE_SETUP
#line 159 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ULONG); }
#line 156 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(ULONG,ULongTy,"ulong",false); }
YY_BREAK
case 55:
YY_RULE_SETUP
#line 160 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( FLOAT); }
#line 157 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(FLOAT,FloatTy,"float",false); }
YY_BREAK
case 56:
YY_RULE_SETUP
#line 161 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( DOUBLE); }
#line 158 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(DOUBLE,DoubleTy,"double",false); }
YY_BREAK
case 57:
YY_RULE_SETUP
#line 162 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( LABEL); }
#line 159 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(LABEL,LabelTy,"label",false); }
YY_BREAK
case 58:
YY_RULE_SETUP
#line 163 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( TYPE); }
#line 160 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(OPAQUE,OpaqueTy,"opaque",false); }
YY_BREAK
case 59:
YY_RULE_SETUP
#line 164 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( OPAQUE); }
#line 161 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(TYPE); }
YY_BREAK
case 60:
YY_RULE_SETUP
#line 166 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 163 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ADD); }
YY_BREAK
case 61:
YY_RULE_SETUP
#line 167 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 164 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SUB); }
YY_BREAK
case 62:
YY_RULE_SETUP
#line 168 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 165 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( MUL); }
YY_BREAK
case 63:
YY_RULE_SETUP
#line 169 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 166 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UDIV); }
YY_BREAK
case 64:
YY_RULE_SETUP
#line 170 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 167 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UDIV); }
YY_BREAK
case 65:
YY_RULE_SETUP
#line 171 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 168 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SDIV); }
YY_BREAK
case 66:
YY_RULE_SETUP
#line 172 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 169 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( FDIV); }
YY_BREAK
case 67:
YY_RULE_SETUP
#line 173 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 170 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UREM); }
YY_BREAK
case 68:
YY_RULE_SETUP
#line 174 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 171 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UREM); }
YY_BREAK
case 69:
YY_RULE_SETUP
#line 175 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 172 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SREM); }
YY_BREAK
case 70:
YY_RULE_SETUP
#line 176 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 173 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( FREM); }
YY_BREAK
case 71:
YY_RULE_SETUP
#line 177 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 174 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( AND); }
YY_BREAK
case 72:
YY_RULE_SETUP
#line 178 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 175 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( OR); }
YY_BREAK
case 73:
YY_RULE_SETUP
#line 179 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 176 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( XOR); }
YY_BREAK
case 74:
YY_RULE_SETUP
#line 180 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 177 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SETNE); }
YY_BREAK
case 75:
YY_RULE_SETUP
#line 181 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 178 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SETEQ); }
YY_BREAK
case 76:
YY_RULE_SETUP
#line 182 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 179 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SETLT); }
YY_BREAK
case 77:
YY_RULE_SETUP
#line 183 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 180 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SETGT); }
YY_BREAK
case 78:
YY_RULE_SETUP
#line 184 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 181 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SETLE); }
YY_BREAK
case 79:
YY_RULE_SETUP
#line 185 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 182 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SETGE); }
YY_BREAK
case 80:
YY_RULE_SETUP
#line 187 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 184 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( PHI_TOK); }
YY_BREAK
case 81:
YY_RULE_SETUP
#line 188 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 185 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( CALL); }
YY_BREAK
case 82:
YY_RULE_SETUP
#line 189 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( TRUNC); }
#line 186 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( CAST); }
YY_BREAK
case 83:
YY_RULE_SETUP
#line 190 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 187 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SELECT); }
YY_BREAK
case 84:
YY_RULE_SETUP
#line 191 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 188 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SHL); }
YY_BREAK
case 85:
YY_RULE_SETUP
#line 192 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 189 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( LSHR); }
YY_BREAK
case 86:
YY_RULE_SETUP
#line 193 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 190 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ASHR); }
YY_BREAK
case 87:
YY_RULE_SETUP
#line 194 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 191 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( VAARG); }
YY_BREAK
case 88:
YY_RULE_SETUP
#line 195 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 192 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( RET); }
YY_BREAK
case 89:
YY_RULE_SETUP
#line 196 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 193 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( BR); }
YY_BREAK
case 90:
YY_RULE_SETUP
#line 197 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 194 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SWITCH); }
YY_BREAK
case 91:
YY_RULE_SETUP
#line 198 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 195 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( INVOKE); }
YY_BREAK
case 92:
YY_RULE_SETUP
#line 199 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 196 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UNWIND); }
YY_BREAK
case 93:
YY_RULE_SETUP
#line 200 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 197 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UNREACHABLE); }
YY_BREAK
case 94:
YY_RULE_SETUP
#line 202 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 199 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( MALLOC); }
YY_BREAK
case 95:
YY_RULE_SETUP
#line 203 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 200 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ALLOCA); }
YY_BREAK
case 96:
YY_RULE_SETUP
#line 204 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 201 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( FREE); }
YY_BREAK
case 97:
YY_RULE_SETUP
#line 205 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 202 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( LOAD); }
YY_BREAK
case 98:
YY_RULE_SETUP
#line 206 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 203 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( STORE); }
YY_BREAK
case 99:
YY_RULE_SETUP
#line 207 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 204 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( GETELEMENTPTR); }
YY_BREAK
case 100:
YY_RULE_SETUP
#line 209 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 206 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( EXTRACTELEMENT); }
YY_BREAK
case 101:
YY_RULE_SETUP
#line 210 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 207 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( INSERTELEMENT); }
YY_BREAK
case 102:
YY_RULE_SETUP
#line 211 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 208 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SHUFFLEVECTOR); }
YY_BREAK
case 103:
YY_RULE_SETUP
#line 214 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 211 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( VAR_ID); }
YY_BREAK
case 104:
YY_RULE_SETUP
#line 215 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 212 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( LABELSTR); }
YY_BREAK
case 105:
YY_RULE_SETUP
#line 216 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 213 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( LABELSTR); }
YY_BREAK
case 106:
YY_RULE_SETUP
#line 217 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 214 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( STRINGCONSTANT ); }
YY_BREAK
case 107:
YY_RULE_SETUP
#line 218 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 215 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( EUINT64VAL ); }
YY_BREAK
case 108:
YY_RULE_SETUP
#line 219 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 216 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ESINT64VAL ); }
YY_BREAK
case 109:
YY_RULE_SETUP
#line 220 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 217 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( yytext[0] == 's' ? ESINT64VAL : EUINT64VAL ); }
YY_BREAK
case 110:
YY_RULE_SETUP
#line 221 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 218 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UINTVAL); }
YY_BREAK
case 111:
YY_RULE_SETUP
#line 222 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 219 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SINTVAL); }
YY_BREAK
case 112:
YY_RULE_SETUP
#line 223 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 220 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( FPVAL); }
YY_BREAK
case 113:
YY_RULE_SETUP
#line 224 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 221 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( FPVAL); }
YY_BREAK
case YY_STATE_EOF(INITIAL):
#line 225 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 222 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{
/* Make sure to free the internal buffers for flex when we are
* done reading our input!
@ -1725,20 +1722,20 @@ case YY_STATE_EOF(INITIAL):
YY_BREAK
case 114:
YY_RULE_SETUP
#line 233 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 230 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ /* Ignore whitespace */ }
YY_BREAK
case 115:
YY_RULE_SETUP
#line 234 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 231 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ return yytext[0]; }
YY_BREAK
case 116:
YY_RULE_SETUP
#line 236 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 233 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
#line 1742 "UpgradeLexer.cpp"
#line 1739 "UpgradeLexer.cpp"
case YY_END_OF_BUFFER:
{
@ -2616,5 +2613,5 @@ int main()
return 0;
}
#endif
#line 236 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 233 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"

View File

@ -334,11 +334,11 @@ static yyconst short int yy_acclist[194] =
62, 80, 67, 88, 84, 61, 73, 105, 112, 112,
86, 46, 81, 82, 66, 96, 70, 97, 53, 85,
21, 109, 65, 69, 23, 4, 58, 64, 52, 68,
21, 109, 65, 69, 23, 4, 59, 64, 52, 68,
45, 11, 112, 33, 2, 5, 55, 57, 47, 75,
79, 77, 78, 76, 74, 49, 98, 48, 54, 20,
95, 42, 56, 27, 41, 7, 91, 30, 94, 35,
59, 83, 90, 24, 25, 92, 50, 87, 40, 6,
58, 83, 90, 24, 25, 92, 50, 87, 40, 6,
26, 34, 8, 16, 9, 10, 32, 12, 14, 13,
29, 37, 15, 28, 93, 99, 101, 102, 43, 100,
17, 44, 18
@ -858,17 +858,10 @@ char *yytext;
#line 28 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#include "ParserInternals.h"
#define YYSTYPE std::string*
#include "UpgradeParser.h"
#include <cctype>
#include <cstdlib>
static void trim(std::string& str) {
size_t startpos = str.find_first_not_of(" \t\n\r",0);
if (startpos != std::string::npos)
str.erase(0,startpos);
}
#define YY_INPUT(buf,result,max_size) \
{ \
if (LexInput->good() && !LexInput->eof()) { \
@ -882,8 +875,12 @@ static void trim(std::string& str) {
// Construct a token value for a non-obsolete token
#define RET_TOK(sym) \
Upgradelval = new std::string(yytext); \
trim(*Upgradelval); \
Upgradelval.String = new std::string(yytext); \
return sym
#define RET_TY(sym,OldTY,NewTY,sign) \
Upgradelval.Type.newTy = new std::string(NewTY); \
Upgradelval.Type.oldTy = OldTY; \
return sym
#define YY_NEVER_INTERACTIVE 1
@ -903,7 +900,7 @@ static void trim(std::string& str) {
/* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
* it to deal with 64 bit numbers.
*/
#line 907 "UpgradeLexer.cpp"
#line 904 "UpgradeLexer.cpp"
/* Macros after this point can all be overridden by user definitions in
* section 1.
@ -1054,10 +1051,10 @@ YY_DECL
register char *yy_cp = NULL, *yy_bp = NULL;
register int yy_act;
#line 101 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 98 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 1061 "UpgradeLexer.cpp"
#line 1058 "UpgradeLexer.cpp"
if ( yy_init )
{
@ -1150,571 +1147,571 @@ do_action: /* This label is used only to access EOF actions. */
{ /* beginning of action switch */
case 1:
YY_RULE_SETUP
#line 103 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 100 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ /* Ignore comments for now */ }
YY_BREAK
case 2:
YY_RULE_SETUP
#line 105 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 102 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( BEGINTOK); }
YY_BREAK
case 3:
YY_RULE_SETUP
#line 106 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 103 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ENDTOK); }
YY_BREAK
case 4:
YY_RULE_SETUP
#line 107 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 104 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( TRUETOK); }
YY_BREAK
case 5:
YY_RULE_SETUP
#line 108 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 105 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( FALSETOK); }
YY_BREAK
case 6:
YY_RULE_SETUP
#line 109 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 106 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( DECLARE); }
YY_BREAK
case 7:
YY_RULE_SETUP
#line 110 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 107 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( GLOBAL); }
YY_BREAK
case 8:
YY_RULE_SETUP
#line 111 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 108 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( CONSTANT); }
YY_BREAK
case 9:
YY_RULE_SETUP
#line 112 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 109 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( INTERNAL); }
YY_BREAK
case 10:
YY_RULE_SETUP
#line 113 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 110 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( LINKONCE); }
YY_BREAK
case 11:
YY_RULE_SETUP
#line 114 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 111 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( WEAK); }
YY_BREAK
case 12:
YY_RULE_SETUP
#line 115 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 112 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( APPENDING); }
YY_BREAK
case 13:
YY_RULE_SETUP
#line 116 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 113 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( DLLIMPORT); }
YY_BREAK
case 14:
YY_RULE_SETUP
#line 117 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 114 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( DLLEXPORT); }
YY_BREAK
case 15:
YY_RULE_SETUP
#line 118 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 115 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( EXTERN_WEAK); }
YY_BREAK
case 16:
YY_RULE_SETUP
#line 119 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 116 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( EXTERNAL); }
YY_BREAK
case 17:
YY_RULE_SETUP
#line 120 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 117 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( IMPLEMENTATION); }
YY_BREAK
case 18:
YY_RULE_SETUP
#line 121 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 118 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ZEROINITIALIZER); }
YY_BREAK
case 19:
YY_RULE_SETUP
#line 122 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 119 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( DOTDOTDOT); }
YY_BREAK
case 20:
YY_RULE_SETUP
#line 123 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 120 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UNDEF); }
YY_BREAK
case 21:
YY_RULE_SETUP
#line 124 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 121 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( NULL_TOK); }
YY_BREAK
case 22:
YY_RULE_SETUP
#line 125 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 122 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( TO); }
YY_BREAK
case 23:
YY_RULE_SETUP
#line 126 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 123 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( TAIL); }
YY_BREAK
case 24:
YY_RULE_SETUP
#line 127 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 124 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( TARGET); }
YY_BREAK
case 25:
YY_RULE_SETUP
#line 128 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 125 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( TRIPLE); }
YY_BREAK
case 26:
YY_RULE_SETUP
#line 129 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 126 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( DEPLIBS); }
YY_BREAK
case 27:
YY_RULE_SETUP
#line 130 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 127 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ENDIAN); }
YY_BREAK
case 28:
YY_RULE_SETUP
#line 131 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 128 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( POINTERSIZE); }
YY_BREAK
case 29:
YY_RULE_SETUP
#line 132 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 129 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( DATALAYOUT); }
YY_BREAK
case 30:
YY_RULE_SETUP
#line 133 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 130 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( LITTLE); }
YY_BREAK
case 31:
YY_RULE_SETUP
#line 134 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 131 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( BIG); }
YY_BREAK
case 32:
YY_RULE_SETUP
#line 135 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 132 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( VOLATILE); }
YY_BREAK
case 33:
YY_RULE_SETUP
#line 136 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 133 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ALIGN); }
YY_BREAK
case 34:
YY_RULE_SETUP
#line 137 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 134 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SECTION); }
YY_BREAK
case 35:
YY_RULE_SETUP
#line 138 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 135 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( MODULE); }
YY_BREAK
case 36:
YY_RULE_SETUP
#line 139 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 136 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ASM_TOK); }
YY_BREAK
case 37:
YY_RULE_SETUP
#line 140 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 137 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SIDEEFFECT); }
YY_BREAK
case 38:
YY_RULE_SETUP
#line 142 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 139 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( CC_TOK); }
YY_BREAK
case 39:
YY_RULE_SETUP
#line 143 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 140 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( CCC_TOK); }
YY_BREAK
case 40:
YY_RULE_SETUP
#line 144 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 141 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( CSRETCC_TOK); }
YY_BREAK
case 41:
YY_RULE_SETUP
#line 145 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 142 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( FASTCC_TOK); }
YY_BREAK
case 42:
YY_RULE_SETUP
#line 146 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 143 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( COLDCC_TOK); }
YY_BREAK
case 43:
YY_RULE_SETUP
#line 147 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 144 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( X86_STDCALLCC_TOK); }
YY_BREAK
case 44:
YY_RULE_SETUP
#line 148 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 145 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( X86_FASTCALLCC_TOK); }
YY_BREAK
case 45:
YY_RULE_SETUP
#line 150 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( VOID); }
#line 147 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(VOID,VoidTy,"void",false); }
YY_BREAK
case 46:
YY_RULE_SETUP
#line 151 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( BOOL); }
#line 148 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(BOOL,BoolTy,"bool",false); }
YY_BREAK
case 47:
YY_RULE_SETUP
#line 152 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SBYTE); }
#line 149 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(SBYTE,SByteTy,"sbyte",true); }
YY_BREAK
case 48:
YY_RULE_SETUP
#line 153 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UBYTE); }
#line 150 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(UBYTE,UByteTy,"ubyte",false); }
YY_BREAK
case 49:
YY_RULE_SETUP
#line 154 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SHORT); }
#line 151 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(SHORT,ShortTy,"short",true); }
YY_BREAK
case 50:
YY_RULE_SETUP
#line 155 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( USHORT); }
#line 152 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(USHORT,UShortTy,"ushort",false); }
YY_BREAK
case 51:
YY_RULE_SETUP
#line 156 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( INT); }
#line 153 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(INT,IntTy,"int",true); }
YY_BREAK
case 52:
YY_RULE_SETUP
#line 157 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UINT); }
#line 154 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(UINT,UIntTy,"uint",false); }
YY_BREAK
case 53:
YY_RULE_SETUP
#line 158 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( LONG); }
#line 155 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(LONG,LongTy,"long",true); }
YY_BREAK
case 54:
YY_RULE_SETUP
#line 159 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ULONG); }
#line 156 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(ULONG,ULongTy,"ulong",false); }
YY_BREAK
case 55:
YY_RULE_SETUP
#line 160 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( FLOAT); }
#line 157 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(FLOAT,FloatTy,"float",false); }
YY_BREAK
case 56:
YY_RULE_SETUP
#line 161 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( DOUBLE); }
#line 158 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(DOUBLE,DoubleTy,"double",false); }
YY_BREAK
case 57:
YY_RULE_SETUP
#line 162 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( LABEL); }
#line 159 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(LABEL,LabelTy,"label",false); }
YY_BREAK
case 58:
YY_RULE_SETUP
#line 163 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( TYPE); }
#line 160 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(OPAQUE,OpaqueTy,"opaque",false); }
YY_BREAK
case 59:
YY_RULE_SETUP
#line 164 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( OPAQUE); }
#line 161 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(TYPE); }
YY_BREAK
case 60:
YY_RULE_SETUP
#line 166 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 163 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ADD); }
YY_BREAK
case 61:
YY_RULE_SETUP
#line 167 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 164 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SUB); }
YY_BREAK
case 62:
YY_RULE_SETUP
#line 168 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 165 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( MUL); }
YY_BREAK
case 63:
YY_RULE_SETUP
#line 169 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 166 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UDIV); }
YY_BREAK
case 64:
YY_RULE_SETUP
#line 170 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 167 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UDIV); }
YY_BREAK
case 65:
YY_RULE_SETUP
#line 171 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 168 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SDIV); }
YY_BREAK
case 66:
YY_RULE_SETUP
#line 172 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 169 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( FDIV); }
YY_BREAK
case 67:
YY_RULE_SETUP
#line 173 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 170 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UREM); }
YY_BREAK
case 68:
YY_RULE_SETUP
#line 174 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 171 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UREM); }
YY_BREAK
case 69:
YY_RULE_SETUP
#line 175 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 172 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SREM); }
YY_BREAK
case 70:
YY_RULE_SETUP
#line 176 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 173 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( FREM); }
YY_BREAK
case 71:
YY_RULE_SETUP
#line 177 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 174 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( AND); }
YY_BREAK
case 72:
YY_RULE_SETUP
#line 178 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 175 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( OR); }
YY_BREAK
case 73:
YY_RULE_SETUP
#line 179 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 176 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( XOR); }
YY_BREAK
case 74:
YY_RULE_SETUP
#line 180 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 177 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SETNE); }
YY_BREAK
case 75:
YY_RULE_SETUP
#line 181 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 178 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SETEQ); }
YY_BREAK
case 76:
YY_RULE_SETUP
#line 182 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 179 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SETLT); }
YY_BREAK
case 77:
YY_RULE_SETUP
#line 183 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 180 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SETGT); }
YY_BREAK
case 78:
YY_RULE_SETUP
#line 184 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 181 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SETLE); }
YY_BREAK
case 79:
YY_RULE_SETUP
#line 185 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 182 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SETGE); }
YY_BREAK
case 80:
YY_RULE_SETUP
#line 187 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 184 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( PHI_TOK); }
YY_BREAK
case 81:
YY_RULE_SETUP
#line 188 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 185 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( CALL); }
YY_BREAK
case 82:
YY_RULE_SETUP
#line 189 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( TRUNC); }
#line 186 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( CAST); }
YY_BREAK
case 83:
YY_RULE_SETUP
#line 190 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 187 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SELECT); }
YY_BREAK
case 84:
YY_RULE_SETUP
#line 191 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 188 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SHL); }
YY_BREAK
case 85:
YY_RULE_SETUP
#line 192 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 189 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( LSHR); }
YY_BREAK
case 86:
YY_RULE_SETUP
#line 193 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 190 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ASHR); }
YY_BREAK
case 87:
YY_RULE_SETUP
#line 194 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 191 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( VAARG); }
YY_BREAK
case 88:
YY_RULE_SETUP
#line 195 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 192 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( RET); }
YY_BREAK
case 89:
YY_RULE_SETUP
#line 196 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 193 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( BR); }
YY_BREAK
case 90:
YY_RULE_SETUP
#line 197 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 194 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SWITCH); }
YY_BREAK
case 91:
YY_RULE_SETUP
#line 198 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 195 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( INVOKE); }
YY_BREAK
case 92:
YY_RULE_SETUP
#line 199 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 196 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UNWIND); }
YY_BREAK
case 93:
YY_RULE_SETUP
#line 200 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 197 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UNREACHABLE); }
YY_BREAK
case 94:
YY_RULE_SETUP
#line 202 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 199 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( MALLOC); }
YY_BREAK
case 95:
YY_RULE_SETUP
#line 203 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 200 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ALLOCA); }
YY_BREAK
case 96:
YY_RULE_SETUP
#line 204 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 201 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( FREE); }
YY_BREAK
case 97:
YY_RULE_SETUP
#line 205 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 202 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( LOAD); }
YY_BREAK
case 98:
YY_RULE_SETUP
#line 206 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 203 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( STORE); }
YY_BREAK
case 99:
YY_RULE_SETUP
#line 207 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 204 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( GETELEMENTPTR); }
YY_BREAK
case 100:
YY_RULE_SETUP
#line 209 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 206 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( EXTRACTELEMENT); }
YY_BREAK
case 101:
YY_RULE_SETUP
#line 210 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 207 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( INSERTELEMENT); }
YY_BREAK
case 102:
YY_RULE_SETUP
#line 211 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 208 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SHUFFLEVECTOR); }
YY_BREAK
case 103:
YY_RULE_SETUP
#line 214 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 211 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( VAR_ID); }
YY_BREAK
case 104:
YY_RULE_SETUP
#line 215 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 212 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( LABELSTR); }
YY_BREAK
case 105:
YY_RULE_SETUP
#line 216 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 213 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( LABELSTR); }
YY_BREAK
case 106:
YY_RULE_SETUP
#line 217 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 214 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( STRINGCONSTANT ); }
YY_BREAK
case 107:
YY_RULE_SETUP
#line 218 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 215 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( EUINT64VAL ); }
YY_BREAK
case 108:
YY_RULE_SETUP
#line 219 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 216 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( ESINT64VAL ); }
YY_BREAK
case 109:
YY_RULE_SETUP
#line 220 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 217 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( yytext[0] == 's' ? ESINT64VAL : EUINT64VAL ); }
YY_BREAK
case 110:
YY_RULE_SETUP
#line 221 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 218 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( UINTVAL); }
YY_BREAK
case 111:
YY_RULE_SETUP
#line 222 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 219 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( SINTVAL); }
YY_BREAK
case 112:
YY_RULE_SETUP
#line 223 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 220 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( FPVAL); }
YY_BREAK
case 113:
YY_RULE_SETUP
#line 224 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 221 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK( FPVAL); }
YY_BREAK
case YY_STATE_EOF(INITIAL):
#line 225 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 222 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{
/* Make sure to free the internal buffers for flex when we are
* done reading our input!
@ -1725,20 +1722,20 @@ case YY_STATE_EOF(INITIAL):
YY_BREAK
case 114:
YY_RULE_SETUP
#line 233 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 230 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ /* Ignore whitespace */ }
YY_BREAK
case 115:
YY_RULE_SETUP
#line 234 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 231 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
{ return yytext[0]; }
YY_BREAK
case 116:
YY_RULE_SETUP
#line 236 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 233 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
#line 1742 "UpgradeLexer.cpp"
#line 1739 "UpgradeLexer.cpp"
case YY_END_OF_BUFFER:
{
@ -2616,5 +2613,5 @@ int main()
return 0;
}
#endif
#line 236 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"
#line 233 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeLexer.l"

View File

@ -27,17 +27,10 @@
%{
#include "ParserInternals.h"
#define YYSTYPE std::string*
#include "UpgradeParser.h"
#include <cctype>
#include <cstdlib>
static void trim(std::string& str) {
size_t startpos = str.find_first_not_of(" \t\n\r",0);
if (startpos != std::string::npos)
str.erase(0,startpos);
}
#define YY_INPUT(buf,result,max_size) \
{ \
if (LexInput->good() && !LexInput->eof()) { \
@ -51,8 +44,12 @@ static void trim(std::string& str) {
// Construct a token value for a non-obsolete token
#define RET_TOK(sym) \
Upgradelval = new std::string(yytext); \
trim(*Upgradelval); \
Upgradelval.String = new std::string(yytext); \
return sym
#define RET_TY(sym,OldTY,NewTY,sign) \
Upgradelval.Type.newTy = new std::string(NewTY); \
Upgradelval.Type.oldTy = OldTY; \
return sym
#define YY_NEVER_INTERACTIVE 1
@ -147,21 +144,21 @@ coldcc { RET_TOK( COLDCC_TOK); }
x86_stdcallcc { RET_TOK( X86_STDCALLCC_TOK); }
x86_fastcallcc { RET_TOK( X86_FASTCALLCC_TOK); }
void { RET_TOK( VOID); }
bool { RET_TOK( BOOL); }
sbyte { RET_TOK( SBYTE); }
ubyte { RET_TOK( UBYTE); }
short { RET_TOK( SHORT); }
ushort { RET_TOK( USHORT); }
int { RET_TOK( INT); }
uint { RET_TOK( UINT); }
long { RET_TOK( LONG); }
ulong { RET_TOK( ULONG); }
float { RET_TOK( FLOAT); }
double { RET_TOK( DOUBLE); }
label { RET_TOK( LABEL); }
type { RET_TOK( TYPE); }
opaque { RET_TOK( OPAQUE); }
void { RET_TY(VOID,VoidTy,"void",false); }
bool { RET_TY(BOOL,BoolTy,"bool",false); }
sbyte { RET_TY(SBYTE,SByteTy,"sbyte",true); }
ubyte { RET_TY(UBYTE,UByteTy,"ubyte",false); }
short { RET_TY(SHORT,ShortTy,"short",true); }
ushort { RET_TY(USHORT,UShortTy,"ushort",false); }
int { RET_TY(INT,IntTy,"int",true); }
uint { RET_TY(UINT,UIntTy,"uint",false); }
long { RET_TY(LONG,LongTy,"long",true); }
ulong { RET_TY(ULONG,ULongTy,"ulong",false); }
float { RET_TY(FLOAT,FloatTy,"float",false); }
double { RET_TY(DOUBLE,DoubleTy,"double",false); }
label { RET_TY(LABEL,LabelTy,"label",false); }
opaque { RET_TY(OPAQUE,OpaqueTy,"opaque",false); }
type { RET_TOK(TYPE); }
add { RET_TOK( ADD); }
sub { RET_TOK( SUB); }
@ -186,7 +183,7 @@ setge { RET_TOK( SETGE); }
phi { RET_TOK( PHI_TOK); }
call { RET_TOK( CALL); }
cast { RET_TOK( TRUNC); }
cast { RET_TOK( CAST); }
select { RET_TOK( SELECT); }
shl { RET_TOK( SHL); }
lshr { RET_TOK( LSHR); }

View File

@ -27,17 +27,10 @@
%{
#include "ParserInternals.h"
#define YYSTYPE std::string*
#include "UpgradeParser.h"
#include <cctype>
#include <cstdlib>
static void trim(std::string& str) {
size_t startpos = str.find_first_not_of(" \t\n\r",0);
if (startpos != std::string::npos)
str.erase(0,startpos);
}
#define YY_INPUT(buf,result,max_size) \
{ \
if (LexInput->good() && !LexInput->eof()) { \
@ -51,8 +44,12 @@ static void trim(std::string& str) {
// Construct a token value for a non-obsolete token
#define RET_TOK(sym) \
Upgradelval = new std::string(yytext); \
trim(*Upgradelval); \
Upgradelval.String = new std::string(yytext); \
return sym
#define RET_TY(sym,OldTY,NewTY,sign) \
Upgradelval.Type.newTy = new std::string(NewTY); \
Upgradelval.Type.oldTy = OldTY; \
return sym
#define YY_NEVER_INTERACTIVE 1
@ -147,21 +144,21 @@ coldcc { RET_TOK( COLDCC_TOK); }
x86_stdcallcc { RET_TOK( X86_STDCALLCC_TOK); }
x86_fastcallcc { RET_TOK( X86_FASTCALLCC_TOK); }
void { RET_TOK( VOID); }
bool { RET_TOK( BOOL); }
sbyte { RET_TOK( SBYTE); }
ubyte { RET_TOK( UBYTE); }
short { RET_TOK( SHORT); }
ushort { RET_TOK( USHORT); }
int { RET_TOK( INT); }
uint { RET_TOK( UINT); }
long { RET_TOK( LONG); }
ulong { RET_TOK( ULONG); }
float { RET_TOK( FLOAT); }
double { RET_TOK( DOUBLE); }
label { RET_TOK( LABEL); }
type { RET_TOK( TYPE); }
opaque { RET_TOK( OPAQUE); }
void { RET_TY(VOID,VoidTy,"void",false); }
bool { RET_TY(BOOL,BoolTy,"bool",false); }
sbyte { RET_TY(SBYTE,SByteTy,"sbyte",true); }
ubyte { RET_TY(UBYTE,UByteTy,"ubyte",false); }
short { RET_TY(SHORT,ShortTy,"short",true); }
ushort { RET_TY(USHORT,UShortTy,"ushort",false); }
int { RET_TY(INT,IntTy,"int",true); }
uint { RET_TY(UINT,UIntTy,"uint",false); }
long { RET_TY(LONG,LongTy,"long",true); }
ulong { RET_TY(ULONG,ULongTy,"ulong",false); }
float { RET_TY(FLOAT,FloatTy,"float",false); }
double { RET_TY(DOUBLE,DoubleTy,"double",false); }
label { RET_TY(LABEL,LabelTy,"label",false); }
opaque { RET_TY(OPAQUE,OpaqueTy,"opaque",false); }
type { RET_TOK(TYPE); }
add { RET_TOK( ADD); }
sub { RET_TOK( SUB); }
@ -186,7 +183,7 @@ setge { RET_TOK( SETGE); }
phi { RET_TOK( PHI_TOK); }
call { RET_TOK( CALL); }
cast { RET_TOK( TRUNC); }
cast { RET_TOK( CAST); }
select { RET_TOK( SELECT); }
shl { RET_TOK( SHL); }
lshr { RET_TOK( LSHR); }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -34,47 +34,47 @@
SINTVAL = 260,
UINTVAL = 261,
FPVAL = 262,
VOID = 263,
BOOL = 264,
SBYTE = 265,
UBYTE = 266,
SHORT = 267,
USHORT = 268,
INT = 269,
UINT = 270,
LONG = 271,
ULONG = 272,
FLOAT = 273,
DOUBLE = 274,
TYPE = 275,
LABEL = 276,
VAR_ID = 277,
LABELSTR = 278,
STRINGCONSTANT = 279,
IMPLEMENTATION = 280,
ZEROINITIALIZER = 281,
TRUETOK = 282,
FALSETOK = 283,
BEGINTOK = 284,
ENDTOK = 285,
DECLARE = 286,
GLOBAL = 287,
CONSTANT = 288,
SECTION = 289,
VOLATILE = 290,
TO = 291,
DOTDOTDOT = 292,
NULL_TOK = 293,
UNDEF = 294,
CONST = 295,
INTERNAL = 296,
LINKONCE = 297,
WEAK = 298,
APPENDING = 299,
TRUETOK = 263,
FALSETOK = 264,
NULL_TOK = 265,
UNDEF = 266,
ZEROINITIALIZER = 267,
VOID = 268,
BOOL = 269,
SBYTE = 270,
UBYTE = 271,
SHORT = 272,
USHORT = 273,
INT = 274,
UINT = 275,
LONG = 276,
ULONG = 277,
FLOAT = 278,
DOUBLE = 279,
LABEL = 280,
OPAQUE = 281,
TYPE = 282,
VAR_ID = 283,
LABELSTR = 284,
STRINGCONSTANT = 285,
IMPLEMENTATION = 286,
BEGINTOK = 287,
ENDTOK = 288,
DECLARE = 289,
GLOBAL = 290,
CONSTANT = 291,
SECTION = 292,
VOLATILE = 293,
TO = 294,
DOTDOTDOT = 295,
CONST = 296,
INTERNAL = 297,
LINKONCE = 298,
WEAK = 299,
DLLIMPORT = 300,
DLLEXPORT = 301,
EXTERN_WEAK = 302,
OPAQUE = 303,
APPENDING = 303,
NOT = 304,
EXTERNAL = 305,
TARGET = 306,
@ -128,28 +128,16 @@
LOAD = 354,
STORE = 355,
GETELEMENTPTR = 356,
TRUNC = 357,
ZEXT = 358,
SEXT = 359,
FPTRUNC = 360,
FPEXT = 361,
BITCAST = 362,
UITOFP = 363,
SITOFP = 364,
FPTOUI = 365,
FPTOSI = 366,
INTTOPTR = 367,
PTRTOINT = 368,
PHI_TOK = 369,
SELECT = 370,
SHL = 371,
LSHR = 372,
ASHR = 373,
VAARG = 374,
EXTRACTELEMENT = 375,
INSERTELEMENT = 376,
SHUFFLEVECTOR = 377,
CAST = 378
PHI_TOK = 357,
SELECT = 358,
SHL = 359,
LSHR = 360,
ASHR = 361,
VAARG = 362,
EXTRACTELEMENT = 363,
INSERTELEMENT = 364,
SHUFFLEVECTOR = 365,
CAST = 366
};
#endif
/* Tokens. */
@ -158,47 +146,47 @@
#define SINTVAL 260
#define UINTVAL 261
#define FPVAL 262
#define VOID 263
#define BOOL 264
#define SBYTE 265
#define UBYTE 266
#define SHORT 267
#define USHORT 268
#define INT 269
#define UINT 270
#define LONG 271
#define ULONG 272
#define FLOAT 273
#define DOUBLE 274
#define TYPE 275
#define LABEL 276
#define VAR_ID 277
#define LABELSTR 278
#define STRINGCONSTANT 279
#define IMPLEMENTATION 280
#define ZEROINITIALIZER 281
#define TRUETOK 282
#define FALSETOK 283
#define BEGINTOK 284
#define ENDTOK 285
#define DECLARE 286
#define GLOBAL 287
#define CONSTANT 288
#define SECTION 289
#define VOLATILE 290
#define TO 291
#define DOTDOTDOT 292
#define NULL_TOK 293
#define UNDEF 294
#define CONST 295
#define INTERNAL 296
#define LINKONCE 297
#define WEAK 298
#define APPENDING 299
#define TRUETOK 263
#define FALSETOK 264
#define NULL_TOK 265
#define UNDEF 266
#define ZEROINITIALIZER 267
#define VOID 268
#define BOOL 269
#define SBYTE 270
#define UBYTE 271
#define SHORT 272
#define USHORT 273
#define INT 274
#define UINT 275
#define LONG 276
#define ULONG 277
#define FLOAT 278
#define DOUBLE 279
#define LABEL 280
#define OPAQUE 281
#define TYPE 282
#define VAR_ID 283
#define LABELSTR 284
#define STRINGCONSTANT 285
#define IMPLEMENTATION 286
#define BEGINTOK 287
#define ENDTOK 288
#define DECLARE 289
#define GLOBAL 290
#define CONSTANT 291
#define SECTION 292
#define VOLATILE 293
#define TO 294
#define DOTDOTDOT 295
#define CONST 296
#define INTERNAL 297
#define LINKONCE 298
#define WEAK 299
#define DLLIMPORT 300
#define DLLEXPORT 301
#define EXTERN_WEAK 302
#define OPAQUE 303
#define APPENDING 303
#define NOT 304
#define EXTERNAL 305
#define TARGET 306
@ -252,34 +240,30 @@
#define LOAD 354
#define STORE 355
#define GETELEMENTPTR 356
#define TRUNC 357
#define ZEXT 358
#define SEXT 359
#define FPTRUNC 360
#define FPEXT 361
#define BITCAST 362
#define UITOFP 363
#define SITOFP 364
#define FPTOUI 365
#define FPTOSI 366
#define INTTOPTR 367
#define PTRTOINT 368
#define PHI_TOK 369
#define SELECT 370
#define SHL 371
#define LSHR 372
#define ASHR 373
#define VAARG 374
#define EXTRACTELEMENT 375
#define INSERTELEMENT 376
#define SHUFFLEVECTOR 377
#define CAST 378
#define PHI_TOK 357
#define SELECT 358
#define SHL 359
#define LSHR 360
#define ASHR 361
#define VAARG 362
#define EXTRACTELEMENT 363
#define INSERTELEMENT 364
#define SHUFFLEVECTOR 365
#define CAST 366
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
typedef int YYSTYPE;
#line 130 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
typedef union YYSTYPE {
std::string* String;
TypeInfo Type;
ValueInfo Value;
ConstInfo Const;
} YYSTYPE;
/* Line 1447 of yacc.c. */
#line 267 "UpgradeParser.tab.h"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1

View File

@ -34,47 +34,47 @@
SINTVAL = 260,
UINTVAL = 261,
FPVAL = 262,
VOID = 263,
BOOL = 264,
SBYTE = 265,
UBYTE = 266,
SHORT = 267,
USHORT = 268,
INT = 269,
UINT = 270,
LONG = 271,
ULONG = 272,
FLOAT = 273,
DOUBLE = 274,
TYPE = 275,
LABEL = 276,
VAR_ID = 277,
LABELSTR = 278,
STRINGCONSTANT = 279,
IMPLEMENTATION = 280,
ZEROINITIALIZER = 281,
TRUETOK = 282,
FALSETOK = 283,
BEGINTOK = 284,
ENDTOK = 285,
DECLARE = 286,
GLOBAL = 287,
CONSTANT = 288,
SECTION = 289,
VOLATILE = 290,
TO = 291,
DOTDOTDOT = 292,
NULL_TOK = 293,
UNDEF = 294,
CONST = 295,
INTERNAL = 296,
LINKONCE = 297,
WEAK = 298,
APPENDING = 299,
TRUETOK = 263,
FALSETOK = 264,
NULL_TOK = 265,
UNDEF = 266,
ZEROINITIALIZER = 267,
VOID = 268,
BOOL = 269,
SBYTE = 270,
UBYTE = 271,
SHORT = 272,
USHORT = 273,
INT = 274,
UINT = 275,
LONG = 276,
ULONG = 277,
FLOAT = 278,
DOUBLE = 279,
LABEL = 280,
OPAQUE = 281,
TYPE = 282,
VAR_ID = 283,
LABELSTR = 284,
STRINGCONSTANT = 285,
IMPLEMENTATION = 286,
BEGINTOK = 287,
ENDTOK = 288,
DECLARE = 289,
GLOBAL = 290,
CONSTANT = 291,
SECTION = 292,
VOLATILE = 293,
TO = 294,
DOTDOTDOT = 295,
CONST = 296,
INTERNAL = 297,
LINKONCE = 298,
WEAK = 299,
DLLIMPORT = 300,
DLLEXPORT = 301,
EXTERN_WEAK = 302,
OPAQUE = 303,
APPENDING = 303,
NOT = 304,
EXTERNAL = 305,
TARGET = 306,
@ -128,28 +128,16 @@
LOAD = 354,
STORE = 355,
GETELEMENTPTR = 356,
TRUNC = 357,
ZEXT = 358,
SEXT = 359,
FPTRUNC = 360,
FPEXT = 361,
BITCAST = 362,
UITOFP = 363,
SITOFP = 364,
FPTOUI = 365,
FPTOSI = 366,
INTTOPTR = 367,
PTRTOINT = 368,
PHI_TOK = 369,
SELECT = 370,
SHL = 371,
LSHR = 372,
ASHR = 373,
VAARG = 374,
EXTRACTELEMENT = 375,
INSERTELEMENT = 376,
SHUFFLEVECTOR = 377,
CAST = 378
PHI_TOK = 357,
SELECT = 358,
SHL = 359,
LSHR = 360,
ASHR = 361,
VAARG = 362,
EXTRACTELEMENT = 363,
INSERTELEMENT = 364,
SHUFFLEVECTOR = 365,
CAST = 366
};
#endif
/* Tokens. */
@ -158,47 +146,47 @@
#define SINTVAL 260
#define UINTVAL 261
#define FPVAL 262
#define VOID 263
#define BOOL 264
#define SBYTE 265
#define UBYTE 266
#define SHORT 267
#define USHORT 268
#define INT 269
#define UINT 270
#define LONG 271
#define ULONG 272
#define FLOAT 273
#define DOUBLE 274
#define TYPE 275
#define LABEL 276
#define VAR_ID 277
#define LABELSTR 278
#define STRINGCONSTANT 279
#define IMPLEMENTATION 280
#define ZEROINITIALIZER 281
#define TRUETOK 282
#define FALSETOK 283
#define BEGINTOK 284
#define ENDTOK 285
#define DECLARE 286
#define GLOBAL 287
#define CONSTANT 288
#define SECTION 289
#define VOLATILE 290
#define TO 291
#define DOTDOTDOT 292
#define NULL_TOK 293
#define UNDEF 294
#define CONST 295
#define INTERNAL 296
#define LINKONCE 297
#define WEAK 298
#define APPENDING 299
#define TRUETOK 263
#define FALSETOK 264
#define NULL_TOK 265
#define UNDEF 266
#define ZEROINITIALIZER 267
#define VOID 268
#define BOOL 269
#define SBYTE 270
#define UBYTE 271
#define SHORT 272
#define USHORT 273
#define INT 274
#define UINT 275
#define LONG 276
#define ULONG 277
#define FLOAT 278
#define DOUBLE 279
#define LABEL 280
#define OPAQUE 281
#define TYPE 282
#define VAR_ID 283
#define LABELSTR 284
#define STRINGCONSTANT 285
#define IMPLEMENTATION 286
#define BEGINTOK 287
#define ENDTOK 288
#define DECLARE 289
#define GLOBAL 290
#define CONSTANT 291
#define SECTION 292
#define VOLATILE 293
#define TO 294
#define DOTDOTDOT 295
#define CONST 296
#define INTERNAL 297
#define LINKONCE 298
#define WEAK 299
#define DLLIMPORT 300
#define DLLEXPORT 301
#define EXTERN_WEAK 302
#define OPAQUE 303
#define APPENDING 303
#define NOT 304
#define EXTERNAL 305
#define TARGET 306
@ -252,34 +240,30 @@
#define LOAD 354
#define STORE 355
#define GETELEMENTPTR 356
#define TRUNC 357
#define ZEXT 358
#define SEXT 359
#define FPTRUNC 360
#define FPEXT 361
#define BITCAST 362
#define UITOFP 363
#define SITOFP 364
#define FPTOUI 365
#define FPTOSI 366
#define INTTOPTR 367
#define PTRTOINT 368
#define PHI_TOK 369
#define SELECT 370
#define SHL 371
#define LSHR 372
#define ASHR 373
#define VAARG 374
#define EXTRACTELEMENT 375
#define INSERTELEMENT 376
#define SHUFFLEVECTOR 377
#define CAST 378
#define PHI_TOK 357
#define SELECT 358
#define SHL 359
#define LSHR 360
#define ASHR 361
#define VAARG 362
#define EXTRACTELEMENT 363
#define INSERTELEMENT 364
#define SHUFFLEVECTOR 365
#define CAST 366
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
typedef int YYSTYPE;
#line 130 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
typedef union YYSTYPE {
std::string* String;
TypeInfo Type;
ValueInfo Value;
ConstInfo Const;
} YYSTYPE;
/* Line 1447 of yacc.c. */
#line 267 "UpgradeParser.tab.h"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -39,6 +39,10 @@ OutputFilename("o", cl::desc("Override output filename"),
static cl::opt<bool>
Force("f", cl::desc("Overwrite output files"));
static cl::opt<bool>
Debug("debug", cl::desc("Print debug output from yacc parser"),cl::Hidden,
cl::init(false));
int main(int argc, char **argv) {
cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .bc assembler\n");
sys::PrintStackTraceOnErrorSignal();
@ -109,7 +113,7 @@ int main(int argc, char **argv) {
return 1;
}
UpgradeAssembly(InputFilename, *In, *Out);
UpgradeAssembly(InputFilename, *In, *Out, Debug);
} catch (const std::string& caught_message) {
llvm_cerr << argv[0] << ": " << caught_message << "\n";