blob: 2f150bf83dfcae743eaad2b995cc0f1cfb82ddcb [file] [log] [blame]
Chris Lattner0fab59c2007-01-12 18:33:30 +00001typedef union {
Reid Spencer68a24bd2005-08-27 18:50:39 +00002 llvm::Module *ModuleVal;
3 llvm::Function *FunctionVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +00004 llvm::BasicBlock *BasicBlockVal;
5 llvm::TerminatorInst *TermInstVal;
6 llvm::Instruction *InstVal;
Reid Spencera132e042006-12-03 05:46:11 +00007 llvm::Constant *ConstVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +00008
Reid Spencera132e042006-12-03 05:46:11 +00009 const llvm::Type *PrimType;
Reid Spencer14310612006-12-31 05:40:51 +000010 std::list<llvm::PATypeHolder> *TypeList;
Reid Spencera132e042006-12-03 05:46:11 +000011 llvm::PATypeHolder *TypeVal;
12 llvm::Value *ValueVal;
Reid Spencera132e042006-12-03 05:46:11 +000013 std::vector<llvm::Value*> *ValueList;
Reid Spencer14310612006-12-31 05:40:51 +000014 llvm::ArgListType *ArgList;
15 llvm::TypeWithAttrs TypeWithAttrs;
16 llvm::TypeWithAttrsList *TypeWithAttrsList;
17 llvm::ValueRefList *ValueRefList;
18
Reid Spencer68a24bd2005-08-27 18:50:39 +000019 // Represent the RHS of PHI node
Reid Spencera132e042006-12-03 05:46:11 +000020 std::list<std::pair<llvm::Value*,
21 llvm::BasicBlock*> > *PHIList;
Reid Spencer68a24bd2005-08-27 18:50:39 +000022 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
Reid Spencera132e042006-12-03 05:46:11 +000023 std::vector<llvm::Constant*> *ConstVector;
Reid Spencer68a24bd2005-08-27 18:50:39 +000024
25 llvm::GlobalValue::LinkageTypes Linkage;
Reid Spencer14310612006-12-31 05:40:51 +000026 llvm::FunctionType::ParameterAttributes ParamAttrs;
Reid Spencer68a24bd2005-08-27 18:50:39 +000027 int64_t SInt64Val;
28 uint64_t UInt64Val;
29 int SIntVal;
30 unsigned UIntVal;
31 double FPVal;
32 bool BoolVal;
33
34 char *StrVal; // This memory is strdup'd!
Reid Spencer1628cec2006-10-26 06:15:43 +000035 llvm::ValID ValIDVal; // strdup'd memory maybe!
Reid Spencer68a24bd2005-08-27 18:50:39 +000036
Reid Spencera132e042006-12-03 05:46:11 +000037 llvm::Instruction::BinaryOps BinaryOpVal;
38 llvm::Instruction::TermOps TermOpVal;
39 llvm::Instruction::MemoryOps MemOpVal;
40 llvm::Instruction::CastOps CastOpVal;
41 llvm::Instruction::OtherOps OtherOpVal;
Reid Spencer1628cec2006-10-26 06:15:43 +000042 llvm::Module::Endianness Endianness;
Reid Spencera132e042006-12-03 05:46:11 +000043 llvm::ICmpInst::Predicate IPredicate;
44 llvm::FCmpInst::Predicate FPredicate;
Andrew Lenharth6353e052006-12-08 18:07:09 +000045} YYSTYPE;
Chris Lattner0fab59c2007-01-12 18:33:30 +000046#define ESINT64VAL 257
47#define EUINT64VAL 258
48#define SINTVAL 259
49#define UINTVAL 260
50#define FPVAL 261
51#define VOID 262
52#define BOOL 263
53#define INTTYPE 264
54#define FLOAT 265
55#define DOUBLE 266
56#define LABEL 267
57#define TYPE 268
58#define VAR_ID 269
59#define LABELSTR 270
60#define STRINGCONSTANT 271
61#define IMPLEMENTATION 272
62#define ZEROINITIALIZER 273
63#define TRUETOK 274
64#define FALSETOK 275
65#define BEGINTOK 276
66#define ENDTOK 277
67#define DECLARE 278
68#define DEFINE 279
69#define GLOBAL 280
70#define CONSTANT 281
71#define SECTION 282
72#define VOLATILE 283
73#define TO 284
74#define DOTDOTDOT 285
75#define NULL_TOK 286
76#define UNDEF 287
77#define INTERNAL 288
78#define LINKONCE 289
79#define WEAK 290
80#define APPENDING 291
81#define DLLIMPORT 292
82#define DLLEXPORT 293
83#define EXTERN_WEAK 294
84#define OPAQUE 295
85#define EXTERNAL 296
86#define TARGET 297
87#define TRIPLE 298
88#define ENDIAN 299
89#define POINTERSIZE 300
90#define LITTLE 301
91#define BIG 302
92#define ALIGN 303
93#define DEPLIBS 304
94#define CALL 305
95#define TAIL 306
96#define ASM_TOK 307
97#define MODULE 308
98#define SIDEEFFECT 309
99#define CC_TOK 310
100#define CCC_TOK 311
101#define CSRETCC_TOK 312
102#define FASTCC_TOK 313
103#define COLDCC_TOK 314
104#define X86_STDCALLCC_TOK 315
105#define X86_FASTCALLCC_TOK 316
106#define DATALAYOUT 317
107#define RET 318
108#define BR 319
109#define SWITCH 320
110#define INVOKE 321
111#define UNWIND 322
112#define UNREACHABLE 323
113#define ADD 324
114#define SUB 325
115#define MUL 326
116#define UDIV 327
117#define SDIV 328
118#define FDIV 329
119#define UREM 330
120#define SREM 331
121#define FREM 332
122#define AND 333
123#define OR 334
124#define XOR 335
125#define ICMP 336
126#define FCMP 337
127#define EQ 338
128#define NE 339
129#define SLT 340
130#define SGT 341
131#define SLE 342
132#define SGE 343
133#define ULT 344
134#define UGT 345
135#define ULE 346
136#define UGE 347
137#define OEQ 348
138#define ONE 349
139#define OLT 350
140#define OGT 351
141#define OLE 352
142#define OGE 353
143#define ORD 354
144#define UNO 355
145#define UEQ 356
146#define UNE 357
147#define MALLOC 358
148#define ALLOCA 359
149#define FREE 360
150#define LOAD 361
151#define STORE 362
152#define GETELEMENTPTR 363
153#define TRUNC 364
154#define ZEXT 365
155#define SEXT 366
156#define FPTRUNC 367
157#define FPEXT 368
158#define BITCAST 369
159#define UITOFP 370
160#define SITOFP 371
161#define FPTOUI 372
162#define FPTOSI 373
163#define INTTOPTR 374
164#define PTRTOINT 375
165#define PHI_TOK 376
166#define SELECT 377
167#define SHL 378
168#define LSHR 379
169#define ASHR 380
170#define VAARG 381
171#define EXTRACTELEMENT 382
172#define INSERTELEMENT 383
173#define SHUFFLEVECTOR 384
174#define NORETURN 385
175
Reid Spencer68a24bd2005-08-27 18:50:39 +0000176
177extern YYSTYPE llvmAsmlval;