blob: d50f0169d12080e832efe5141436cc42b9aa3f1f [file] [log] [blame]
Christopher Lamb0a243582007-12-11 09:02:08 +00001typedef union {
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002 llvm::Module *ModuleVal;
3 llvm::Function *FunctionVal;
4 llvm::BasicBlock *BasicBlockVal;
5 llvm::TerminatorInst *TermInstVal;
6 llvm::Instruction *InstVal;
7 llvm::Constant *ConstVal;
8
9 const llvm::Type *PrimType;
10 std::list<llvm::PATypeHolder> *TypeList;
11 llvm::PATypeHolder *TypeVal;
12 llvm::Value *ValueVal;
13 std::vector<llvm::Value*> *ValueList;
14 llvm::ArgListType *ArgList;
15 llvm::TypeWithAttrs TypeWithAttrs;
16 llvm::TypeWithAttrsList *TypeWithAttrsList;
Dale Johannesencfb19e62007-11-05 21:20:28 +000017 llvm::ParamList *ParamList;
Dan Gohmanf17a25c2007-07-18 16:29:46 +000018
19 // Represent the RHS of PHI node
20 std::list<std::pair<llvm::Value*,
21 llvm::BasicBlock*> > *PHIList;
22 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
23 std::vector<llvm::Constant*> *ConstVector;
24
25 llvm::GlobalValue::LinkageTypes Linkage;
26 llvm::GlobalValue::VisibilityTypes Visibility;
27 uint16_t ParamAttrs;
28 llvm::APInt *APIntVal;
29 int64_t SInt64Val;
30 uint64_t UInt64Val;
31 int SIntVal;
32 unsigned UIntVal;
Dale Johannesenb9de9f02007-09-06 18:13:44 +000033 llvm::APFloat *FPVal;
Dan Gohmanf17a25c2007-07-18 16:29:46 +000034 bool BoolVal;
35
36 std::string *StrVal; // This memory must be deleted
37 llvm::ValID ValIDVal;
38
39 llvm::Instruction::BinaryOps BinaryOpVal;
40 llvm::Instruction::TermOps TermOpVal;
41 llvm::Instruction::MemoryOps MemOpVal;
42 llvm::Instruction::CastOps CastOpVal;
43 llvm::Instruction::OtherOps OtherOpVal;
44 llvm::ICmpInst::Predicate IPredicate;
45 llvm::FCmpInst::Predicate FPredicate;
Christopher Lamb0a243582007-12-11 09:02:08 +000046} YYSTYPE;
47#define ESINT64VAL 257
48#define EUINT64VAL 258
49#define ESAPINTVAL 259
50#define EUAPINTVAL 260
51#define LOCALVAL_ID 261
52#define GLOBALVAL_ID 262
53#define FPVAL 263
54#define VOID 264
55#define INTTYPE 265
56#define FLOAT 266
57#define DOUBLE 267
58#define X86_FP80 268
59#define FP128 269
60#define PPC_FP128 270
61#define LABEL 271
62#define TYPE 272
63#define LOCALVAR 273
64#define GLOBALVAR 274
65#define LABELSTR 275
66#define STRINGCONSTANT 276
67#define ATSTRINGCONSTANT 277
68#define PCTSTRINGCONSTANT 278
69#define ZEROINITIALIZER 279
70#define TRUETOK 280
71#define FALSETOK 281
72#define BEGINTOK 282
73#define ENDTOK 283
74#define DECLARE 284
75#define DEFINE 285
76#define GLOBAL 286
77#define CONSTANT 287
78#define SECTION 288
79#define ALIAS 289
80#define VOLATILE 290
81#define THREAD_LOCAL 291
82#define TO 292
83#define DOTDOTDOT 293
84#define NULL_TOK 294
85#define UNDEF 295
86#define INTERNAL 296
87#define LINKONCE 297
88#define WEAK 298
89#define APPENDING 299
90#define DLLIMPORT 300
91#define DLLEXPORT 301
92#define EXTERN_WEAK 302
93#define OPAQUE 303
94#define EXTERNAL 304
95#define TARGET 305
96#define TRIPLE 306
97#define ALIGN 307
98#define ADDRSPACE 308
99#define DEPLIBS 309
100#define CALL 310
101#define TAIL 311
102#define ASM_TOK 312
103#define MODULE 313
104#define SIDEEFFECT 314
105#define CC_TOK 315
106#define CCC_TOK 316
107#define FASTCC_TOK 317
108#define COLDCC_TOK 318
109#define X86_STDCALLCC_TOK 319
110#define X86_FASTCALLCC_TOK 320
111#define DATALAYOUT 321
112#define RET 322
113#define BR 323
114#define SWITCH 324
115#define INVOKE 325
116#define UNWIND 326
117#define UNREACHABLE 327
118#define ADD 328
119#define SUB 329
120#define MUL 330
121#define UDIV 331
122#define SDIV 332
123#define FDIV 333
124#define UREM 334
125#define SREM 335
126#define FREM 336
127#define AND 337
128#define OR 338
129#define XOR 339
130#define SHL 340
131#define LSHR 341
132#define ASHR 342
133#define ICMP 343
134#define FCMP 344
135#define EQ 345
136#define NE 346
137#define SLT 347
138#define SGT 348
139#define SLE 349
140#define SGE 350
141#define ULT 351
142#define UGT 352
143#define ULE 353
144#define UGE 354
145#define OEQ 355
146#define ONE 356
147#define OLT 357
148#define OGT 358
149#define OLE 359
150#define OGE 360
151#define ORD 361
152#define UNO 362
153#define UEQ 363
154#define UNE 364
155#define MALLOC 365
156#define ALLOCA 366
157#define FREE 367
158#define LOAD 368
159#define STORE 369
160#define GETELEMENTPTR 370
161#define TRUNC 371
162#define ZEXT 372
163#define SEXT 373
164#define FPTRUNC 374
165#define FPEXT 375
166#define BITCAST 376
167#define UITOFP 377
168#define SITOFP 378
169#define FPTOUI 379
170#define FPTOSI 380
171#define INTTOPTR 381
172#define PTRTOINT 382
173#define PHI_TOK 383
174#define SELECT 384
175#define VAARG 385
176#define EXTRACTELEMENT 386
177#define INSERTELEMENT 387
178#define SHUFFLEVECTOR 388
179#define SIGNEXT 389
180#define ZEROEXT 390
181#define NORETURN 391
182#define INREG 392
183#define SRET 393
184#define NOUNWIND 394
185#define NOALIAS 395
186#define BYVAL 396
187#define NEST 397
188#define READNONE 398
189#define READONLY 399
190#define GC 400
191#define DEFAULT 401
192#define HIDDEN 402
193#define PROTECTED 403
194
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000195
196extern YYSTYPE llvmAsmlval;