2007-02-19 15:44:24 +08:00
|
|
|
typedef union {
|
2005-08-28 02:50:39 +08:00
|
|
|
llvm::Module *ModuleVal;
|
|
|
|
llvm::Function *FunctionVal;
|
|
|
|
llvm::BasicBlock *BasicBlockVal;
|
|
|
|
llvm::TerminatorInst *TermInstVal;
|
|
|
|
llvm::Instruction *InstVal;
|
2006-12-03 13:46:11 +08:00
|
|
|
llvm::Constant *ConstVal;
|
2005-08-28 02:50:39 +08:00
|
|
|
|
2006-12-03 13:46:11 +08:00
|
|
|
const llvm::Type *PrimType;
|
2006-12-31 13:40:51 +08:00
|
|
|
std::list<llvm::PATypeHolder> *TypeList;
|
2006-12-03 13:46:11 +08:00
|
|
|
llvm::PATypeHolder *TypeVal;
|
|
|
|
llvm::Value *ValueVal;
|
|
|
|
std::vector<llvm::Value*> *ValueList;
|
2006-12-31 13:40:51 +08:00
|
|
|
llvm::ArgListType *ArgList;
|
|
|
|
llvm::TypeWithAttrs TypeWithAttrs;
|
|
|
|
llvm::TypeWithAttrsList *TypeWithAttrsList;
|
|
|
|
llvm::ValueRefList *ValueRefList;
|
|
|
|
|
2005-08-28 02:50:39 +08:00
|
|
|
// Represent the RHS of PHI node
|
2006-12-03 13:46:11 +08:00
|
|
|
std::list<std::pair<llvm::Value*,
|
|
|
|
llvm::BasicBlock*> > *PHIList;
|
2005-08-28 02:50:39 +08:00
|
|
|
std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
|
2006-12-03 13:46:11 +08:00
|
|
|
std::vector<llvm::Constant*> *ConstVector;
|
2005-08-28 02:50:39 +08:00
|
|
|
|
|
|
|
llvm::GlobalValue::LinkageTypes Linkage;
|
2007-01-13 03:22:51 +08:00
|
|
|
llvm::GlobalValue::VisibilityTypes Visibility;
|
2006-12-31 13:40:51 +08:00
|
|
|
llvm::FunctionType::ParameterAttributes ParamAttrs;
|
2005-08-28 02:50:39 +08:00
|
|
|
int64_t SInt64Val;
|
|
|
|
uint64_t UInt64Val;
|
|
|
|
int SIntVal;
|
|
|
|
unsigned UIntVal;
|
|
|
|
double FPVal;
|
|
|
|
bool BoolVal;
|
|
|
|
|
|
|
|
char *StrVal; // This memory is strdup'd!
|
2006-10-26 14:15:43 +08:00
|
|
|
llvm::ValID ValIDVal; // strdup'd memory maybe!
|
2005-08-28 02:50:39 +08:00
|
|
|
|
2006-12-03 13:46:11 +08:00
|
|
|
llvm::Instruction::BinaryOps BinaryOpVal;
|
|
|
|
llvm::Instruction::TermOps TermOpVal;
|
|
|
|
llvm::Instruction::MemoryOps MemOpVal;
|
|
|
|
llvm::Instruction::CastOps CastOpVal;
|
|
|
|
llvm::Instruction::OtherOps OtherOpVal;
|
|
|
|
llvm::ICmpInst::Predicate IPredicate;
|
|
|
|
llvm::FCmpInst::Predicate FPredicate;
|
2007-02-13 13:53:56 +08:00
|
|
|
} YYSTYPE;
|
2007-02-19 15:44:24 +08:00
|
|
|
#define ESINT64VAL 257
|
|
|
|
#define EUINT64VAL 258
|
|
|
|
#define LOCALVAL_ID 259
|
|
|
|
#define GLOBALVAL_ID 260
|
|
|
|
#define FPVAL 261
|
|
|
|
#define VOID 262
|
|
|
|
#define INTTYPE 263
|
|
|
|
#define FLOAT 264
|
|
|
|
#define DOUBLE 265
|
|
|
|
#define LABEL 266
|
|
|
|
#define TYPE 267
|
|
|
|
#define LOCALVAR 268
|
|
|
|
#define GLOBALVAR 269
|
|
|
|
#define LABELSTR 270
|
|
|
|
#define STRINGCONSTANT 271
|
|
|
|
#define ATSTRINGCONSTANT 272
|
|
|
|
#define IMPLEMENTATION 273
|
|
|
|
#define ZEROINITIALIZER 274
|
|
|
|
#define TRUETOK 275
|
|
|
|
#define FALSETOK 276
|
|
|
|
#define BEGINTOK 277
|
|
|
|
#define ENDTOK 278
|
|
|
|
#define DECLARE 279
|
|
|
|
#define DEFINE 280
|
|
|
|
#define GLOBAL 281
|
|
|
|
#define CONSTANT 282
|
|
|
|
#define SECTION 283
|
|
|
|
#define VOLATILE 284
|
|
|
|
#define TO 285
|
|
|
|
#define DOTDOTDOT 286
|
|
|
|
#define NULL_TOK 287
|
|
|
|
#define UNDEF 288
|
|
|
|
#define INTERNAL 289
|
|
|
|
#define LINKONCE 290
|
|
|
|
#define WEAK 291
|
|
|
|
#define APPENDING 292
|
|
|
|
#define DLLIMPORT 293
|
|
|
|
#define DLLEXPORT 294
|
|
|
|
#define EXTERN_WEAK 295
|
|
|
|
#define OPAQUE 296
|
|
|
|
#define EXTERNAL 297
|
|
|
|
#define TARGET 298
|
|
|
|
#define TRIPLE 299
|
|
|
|
#define ALIGN 300
|
|
|
|
#define DEPLIBS 301
|
|
|
|
#define CALL 302
|
|
|
|
#define TAIL 303
|
|
|
|
#define ASM_TOK 304
|
|
|
|
#define MODULE 305
|
|
|
|
#define SIDEEFFECT 306
|
|
|
|
#define CC_TOK 307
|
|
|
|
#define CCC_TOK 308
|
|
|
|
#define FASTCC_TOK 309
|
|
|
|
#define COLDCC_TOK 310
|
|
|
|
#define X86_STDCALLCC_TOK 311
|
|
|
|
#define X86_FASTCALLCC_TOK 312
|
|
|
|
#define DATALAYOUT 313
|
|
|
|
#define RET 314
|
|
|
|
#define BR 315
|
|
|
|
#define SWITCH 316
|
|
|
|
#define INVOKE 317
|
|
|
|
#define UNWIND 318
|
|
|
|
#define UNREACHABLE 319
|
|
|
|
#define ADD 320
|
|
|
|
#define SUB 321
|
|
|
|
#define MUL 322
|
|
|
|
#define UDIV 323
|
|
|
|
#define SDIV 324
|
|
|
|
#define FDIV 325
|
|
|
|
#define UREM 326
|
|
|
|
#define SREM 327
|
|
|
|
#define FREM 328
|
|
|
|
#define AND 329
|
|
|
|
#define OR 330
|
|
|
|
#define XOR 331
|
|
|
|
#define SHL 332
|
|
|
|
#define LSHR 333
|
|
|
|
#define ASHR 334
|
|
|
|
#define ICMP 335
|
|
|
|
#define FCMP 336
|
|
|
|
#define EQ 337
|
|
|
|
#define NE 338
|
|
|
|
#define SLT 339
|
|
|
|
#define SGT 340
|
|
|
|
#define SLE 341
|
|
|
|
#define SGE 342
|
|
|
|
#define ULT 343
|
|
|
|
#define UGT 344
|
|
|
|
#define ULE 345
|
|
|
|
#define UGE 346
|
|
|
|
#define OEQ 347
|
|
|
|
#define ONE 348
|
|
|
|
#define OLT 349
|
|
|
|
#define OGT 350
|
|
|
|
#define OLE 351
|
|
|
|
#define OGE 352
|
|
|
|
#define ORD 353
|
|
|
|
#define UNO 354
|
|
|
|
#define UEQ 355
|
|
|
|
#define UNE 356
|
|
|
|
#define MALLOC 357
|
|
|
|
#define ALLOCA 358
|
|
|
|
#define FREE 359
|
|
|
|
#define LOAD 360
|
|
|
|
#define STORE 361
|
|
|
|
#define GETELEMENTPTR 362
|
|
|
|
#define TRUNC 363
|
|
|
|
#define ZEXT 364
|
|
|
|
#define SEXT 365
|
|
|
|
#define FPTRUNC 366
|
|
|
|
#define FPEXT 367
|
|
|
|
#define BITCAST 368
|
|
|
|
#define UITOFP 369
|
|
|
|
#define SITOFP 370
|
|
|
|
#define FPTOUI 371
|
|
|
|
#define FPTOSI 372
|
|
|
|
#define INTTOPTR 373
|
|
|
|
#define PTRTOINT 374
|
|
|
|
#define PHI_TOK 375
|
|
|
|
#define SELECT 376
|
|
|
|
#define VAARG 377
|
|
|
|
#define EXTRACTELEMENT 378
|
|
|
|
#define INSERTELEMENT 379
|
|
|
|
#define SHUFFLEVECTOR 380
|
|
|
|
#define NORETURN 381
|
|
|
|
#define INREG 382
|
|
|
|
#define SRET 383
|
|
|
|
#define DEFAULT 384
|
|
|
|
#define HIDDEN 385
|
2007-02-15 10:26:10 +08:00
|
|
|
|
|
|
|
|
2007-02-19 15:44:24 +08:00
|
|
|
extern YYSTYPE llvmAsmlval;
|