diff options
Diffstat (limited to 'tools/llvm-upgrade/UpgradeParser.h.cvs')
-rw-r--r-- | tools/llvm-upgrade/UpgradeParser.h.cvs | 490 |
1 files changed, 263 insertions, 227 deletions
diff --git a/tools/llvm-upgrade/UpgradeParser.h.cvs b/tools/llvm-upgrade/UpgradeParser.h.cvs index aab02ac861..7e0e3d8227 100644 --- a/tools/llvm-upgrade/UpgradeParser.h.cvs +++ b/tools/llvm-upgrade/UpgradeParser.h.cvs @@ -1,7 +1,7 @@ -/* A Bison parser, made from /usr/home/jeffc/llvm/tools/llvm-upgrade/UpgradeParser.y, by GNU bison 1.75. */ +/* A Bison parser, made by GNU Bison 2.1. */ /* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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 @@ -15,78 +15,75 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ -#ifndef BISON_UPGRADEPARSER_TAB_H -# define BISON_UPGRADEPARSER_TAB_H - /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { - VOID = 258, - BOOL = 259, - SBYTE = 260, - UBYTE = 261, - SHORT = 262, - USHORT = 263, - INT = 264, - UINT = 265, - LONG = 266, - ULONG = 267, - FLOAT = 268, - DOUBLE = 269, - LABEL = 270, - OPAQUE = 271, - ESINT64VAL = 272, - EUINT64VAL = 273, - SINTVAL = 274, - UINTVAL = 275, - FPVAL = 276, - NULL_TOK = 277, - UNDEF = 278, - ZEROINITIALIZER = 279, - TRUETOK = 280, - FALSETOK = 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, + ESINT64VAL = 258, + EUINT64VAL = 259, + 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, DLLIMPORT = 300, DLLEXPORT = 301, EXTERN_WEAK = 302, - APPENDING = 303, - EXTERNAL = 304, - TARGET = 305, - TRIPLE = 306, - ENDIAN = 307, - POINTERSIZE = 308, - LITTLE = 309, - BIG = 310, - ALIGN = 311, - UNINITIALIZED = 312, + OPAQUE = 303, + NOT = 304, + EXTERNAL = 305, + TARGET = 306, + TRIPLE = 307, + ENDIAN = 308, + POINTERSIZE = 309, + LITTLE = 310, + BIG = 311, + ALIGN = 312, DEPLIBS = 313, CALL = 314, TAIL = 315, @@ -105,9 +102,9 @@ BR = 328, SWITCH = 329, INVOKE = 330, - EXCEPT = 331, + UNREACHABLE = 331, UNWIND = 332, - UNREACHABLE = 333, + EXCEPT = 333, ADD = 334, SUB = 335, MUL = 336, @@ -130,112 +127,115 @@ SETNE = 353, ICMP = 354, FCMP = 355, - EQ = 356, - NE = 357, - SLT = 358, - SGT = 359, - SLE = 360, - SGE = 361, - OEQ = 362, - ONE = 363, - OLT = 364, - OGT = 365, - OLE = 366, - OGE = 367, - ORD = 368, - UNO = 369, - UEQ = 370, - UNE = 371, - ULT = 372, - UGT = 373, - ULE = 374, - UGE = 375, - MALLOC = 376, - ALLOCA = 377, - FREE = 378, - LOAD = 379, - STORE = 380, - GETELEMENTPTR = 381, - PHI_TOK = 382, - SELECT = 383, - SHL = 384, - SHR = 385, - ASHR = 386, - LSHR = 387, - VAARG = 388, - EXTRACTELEMENT = 389, - INSERTELEMENT = 390, - SHUFFLEVECTOR = 391, - CAST = 392, - TRUNC = 393, - ZEXT = 394, - SEXT = 395, - FPTRUNC = 396, - FPEXT = 397, - FPTOUI = 398, - FPTOSI = 399, - UITOFP = 400, - SITOFP = 401, - PTRTOINT = 402, - INTTOPTR = 403, - BITCAST = 404 + MALLOC = 356, + ALLOCA = 357, + FREE = 358, + LOAD = 359, + STORE = 360, + GETELEMENTPTR = 361, + PHI_TOK = 362, + SELECT = 363, + SHL = 364, + SHR = 365, + ASHR = 366, + LSHR = 367, + VAARG = 368, + EXTRACTELEMENT = 369, + INSERTELEMENT = 370, + SHUFFLEVECTOR = 371, + VAARG_old = 372, + VANEXT_old = 373, + EQ = 374, + NE = 375, + SLT = 376, + SGT = 377, + SLE = 378, + SGE = 379, + ULT = 380, + UGT = 381, + ULE = 382, + UGE = 383, + OEQ = 384, + ONE = 385, + OLT = 386, + OGT = 387, + OLE = 388, + OGE = 389, + ORD = 390, + UNO = 391, + UEQ = 392, + UNE = 393, + CAST = 394, + TRUNC = 395, + ZEXT = 396, + SEXT = 397, + FPTRUNC = 398, + FPEXT = 399, + FPTOUI = 400, + FPTOSI = 401, + UITOFP = 402, + SITOFP = 403, + PTRTOINT = 404, + INTTOPTR = 405, + BITCAST = 406 }; #endif -#define VOID 258 -#define BOOL 259 -#define SBYTE 260 -#define UBYTE 261 -#define SHORT 262 -#define USHORT 263 -#define INT 264 -#define UINT 265 -#define LONG 266 -#define ULONG 267 -#define FLOAT 268 -#define DOUBLE 269 -#define LABEL 270 -#define OPAQUE 271 -#define ESINT64VAL 272 -#define EUINT64VAL 273 -#define SINTVAL 274 -#define UINTVAL 275 -#define FPVAL 276 -#define NULL_TOK 277 -#define UNDEF 278 -#define ZEROINITIALIZER 279 -#define TRUETOK 280 -#define FALSETOK 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 +/* Tokens. */ +#define ESINT64VAL 258 +#define EUINT64VAL 259 +#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 DLLIMPORT 300 #define DLLEXPORT 301 #define EXTERN_WEAK 302 -#define APPENDING 303 -#define EXTERNAL 304 -#define TARGET 305 -#define TRIPLE 306 -#define ENDIAN 307 -#define POINTERSIZE 308 -#define LITTLE 309 -#define BIG 310 -#define ALIGN 311 -#define UNINITIALIZED 312 +#define OPAQUE 303 +#define NOT 304 +#define EXTERNAL 305 +#define TARGET 306 +#define TRIPLE 307 +#define ENDIAN 308 +#define POINTERSIZE 309 +#define LITTLE 310 +#define BIG 311 +#define ALIGN 312 #define DEPLIBS 313 #define CALL 314 #define TAIL 315 @@ -254,9 +254,9 @@ #define BR 328 #define SWITCH 329 #define INVOKE 330 -#define EXCEPT 331 +#define UNREACHABLE 331 #define UNWIND 332 -#define UNREACHABLE 333 +#define EXCEPT 333 #define ADD 334 #define SUB 335 #define MUL 336 @@ -279,76 +279,112 @@ #define SETNE 353 #define ICMP 354 #define FCMP 355 -#define EQ 356 -#define NE 357 -#define SLT 358 -#define SGT 359 -#define SLE 360 -#define SGE 361 -#define OEQ 362 -#define ONE 363 -#define OLT 364 -#define OGT 365 -#define OLE 366 -#define OGE 367 -#define ORD 368 -#define UNO 369 -#define UEQ 370 -#define UNE 371 -#define ULT 372 -#define UGT 373 -#define ULE 374 -#define UGE 375 -#define MALLOC 376 -#define ALLOCA 377 -#define FREE 378 -#define LOAD 379 -#define STORE 380 -#define GETELEMENTPTR 381 -#define PHI_TOK 382 -#define SELECT 383 -#define SHL 384 -#define SHR 385 -#define ASHR 386 -#define LSHR 387 -#define VAARG 388 -#define EXTRACTELEMENT 389 -#define INSERTELEMENT 390 -#define SHUFFLEVECTOR 391 -#define CAST 392 -#define TRUNC 393 -#define ZEXT 394 -#define SEXT 395 -#define FPTRUNC 396 -#define FPEXT 397 -#define FPTOUI 398 -#define FPTOSI 399 -#define UITOFP 400 -#define SITOFP 401 -#define PTRTOINT 402 -#define INTTOPTR 403 -#define BITCAST 404 +#define MALLOC 356 +#define ALLOCA 357 +#define FREE 358 +#define LOAD 359 +#define STORE 360 +#define GETELEMENTPTR 361 +#define PHI_TOK 362 +#define SELECT 363 +#define SHL 364 +#define SHR 365 +#define ASHR 366 +#define LSHR 367 +#define VAARG 368 +#define EXTRACTELEMENT 369 +#define INSERTELEMENT 370 +#define SHUFFLEVECTOR 371 +#define VAARG_old 372 +#define VANEXT_old 373 +#define EQ 374 +#define NE 375 +#define SLT 376 +#define SGT 377 +#define SLE 378 +#define SGE 379 +#define ULT 380 +#define UGT 381 +#define ULE 382 +#define UGE 383 +#define OEQ 384 +#define ONE 385 +#define OLT 386 +#define OGT 387 +#define OLE 388 +#define OGE 389 +#define ORD 390 +#define UNO 391 +#define UEQ 392 +#define UNE 393 +#define CAST 394 +#define TRUNC 395 +#define ZEXT 396 +#define SEXT 397 +#define FPTRUNC 398 +#define FPEXT 399 +#define FPTOUI 400 +#define FPTOSI 401 +#define UITOFP 402 +#define SITOFP 403 +#define PTRTOINT 404 +#define INTTOPTR 405 +#define BITCAST 406 + + + + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#line 1469 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +typedef union YYSTYPE { + llvm::Module *ModuleVal; + llvm::Function *FunctionVal; + std::pair<llvm::PATypeInfo, char*> *ArgVal; + llvm::BasicBlock *BasicBlockVal; + llvm::TerminatorInst *TermInstVal; + llvm::InstrInfo InstVal; + llvm::ConstInfo ConstVal; + llvm::ValueInfo ValueVal; + llvm::PATypeInfo TypeVal; + llvm::TypeInfo PrimType; + llvm::PHIListInfo PHIList; + std::list<llvm::PATypeInfo> *TypeList; + std::vector<llvm::ValueInfo> *ValueList; + std::vector<llvm::ConstInfo> *ConstVector; + + std::vector<std::pair<llvm::PATypeInfo,char*> > *ArgList; + // Represent the RHS of PHI node + std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable; + llvm::GlobalValue::LinkageTypes Linkage; + int64_t SInt64Val; + uint64_t UInt64Val; + int SIntVal; + unsigned UIntVal; + double FPVal; + bool BoolVal; + char *StrVal; // This memory is strdup'd! + llvm::ValID ValIDVal; // strdup'd memory maybe! -#ifndef YYSTYPE -#line 971 "/usr/home/jeffc/llvm/tools/llvm-upgrade/UpgradeParser.y" -typedef union { - std::string* String; - const Type* Ty; - Value* Val; - Constant* Const; - ValueList* ValList; - TypeList* TypeVec; -} yystype; -/* Line 1237 of /usr/local/share/bison/yacc.c. */ -#line 347 "UpgradeParser.tab.h" -# define YYSTYPE yystype + llvm::BinaryOps BinaryOpVal; + llvm::TermOps TermOpVal; + llvm::MemoryOps MemOpVal; + llvm::OtherOps OtherOpVal; + llvm::CastOps CastOpVal; + llvm::ICmpInst::Predicate IPred; + llvm::FCmpInst::Predicate FPred; + llvm::Module::Endianness Endianness; +} YYSTYPE; +/* Line 1447 of yacc.c. */ +#line 382 "UpgradeParser.tab.h" +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 #endif extern YYSTYPE Upgradelval; -#endif /* not BISON_UPGRADEPARSER_TAB_H */ |