blob: 6701dd17eb917e32b0ff68fbb63df704d7e27c60 [file] [log] [blame]
Gabor Greif89f01162008-04-06 23:07:54 +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;
Dale Johannesend915ee52008-02-19 21:40:51 +000027 llvm::ParameterAttributes ParamAttrs;
Dan Gohmanf17a25c2007-07-18 16:29:46 +000028 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;
Gabor Greif89f01162008-04-06 23:07:54 +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 UNWINDS 322
113#define RET 323
114#define BR 324
115#define SWITCH 325
116#define INVOKE 326
117#define UNWIND 327
118#define UNREACHABLE 328
119#define ADD 329
120#define SUB 330
121#define MUL 331
122#define UDIV 332
123#define SDIV 333
124#define FDIV 334
125#define UREM 335
126#define SREM 336
127#define FREM 337
128#define AND 338
129#define OR 339
130#define XOR 340
131#define SHL 341
132#define LSHR 342
133#define ASHR 343
134#define ICMP 344
135#define FCMP 345
136#define EQ 346
137#define NE 347
138#define SLT 348
139#define SGT 349
140#define SLE 350
141#define SGE 351
142#define ULT 352
143#define UGT 353
144#define ULE 354
145#define UGE 355
146#define OEQ 356
147#define ONE 357
148#define OLT 358
149#define OGT 359
150#define OLE 360
151#define OGE 361
152#define ORD 362
153#define UNO 363
154#define UEQ 364
155#define UNE 365
156#define MALLOC 366
157#define ALLOCA 367
158#define FREE 368
159#define LOAD 369
160#define STORE 370
161#define GETELEMENTPTR 371
162#define TRUNC 372
163#define ZEXT 373
164#define SEXT 374
165#define FPTRUNC 375
166#define FPEXT 376
167#define BITCAST 377
168#define UITOFP 378
169#define SITOFP 379
170#define FPTOUI 380
171#define FPTOSI 381
172#define INTTOPTR 382
173#define PTRTOINT 383
174#define PHI_TOK 384
175#define SELECT 385
176#define VAARG 386
177#define EXTRACTELEMENT 387
178#define INSERTELEMENT 388
179#define SHUFFLEVECTOR 389
180#define GETRESULT 390
181#define SIGNEXT 391
182#define ZEROEXT 392
183#define NORETURN 393
184#define INREG 394
185#define SRET 395
186#define NOUNWIND 396
187#define NOALIAS 397
188#define BYVAL 398
189#define NEST 399
190#define READNONE 400
191#define READONLY 401
192#define GC 402
193#define DEFAULT 403
194#define HIDDEN 404
195#define PROTECTED 405
196
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000197
198extern YYSTYPE llvmAsmlval;