blob: 322b4582662517458fa07f3776e4363f2aa80150 [file] [log] [blame]
Chris Lattner0275cff2007-08-06 21:00:46 +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;
Anton Korobeynikov178a3522007-01-12 19:22:51 +000026 llvm::GlobalValue::VisibilityTypes Visibility;
Reid Spencer7b5d4662007-04-09 06:16:21 +000027 uint16_t ParamAttrs;
Reid Spencer38c91a92007-02-28 02:24:54 +000028 llvm::APInt *APIntVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +000029 int64_t SInt64Val;
30 uint64_t UInt64Val;
31 int SIntVal;
32 unsigned UIntVal;
33 double FPVal;
34 bool BoolVal;
35
Reid Spencer0a8a16b2007-05-22 18:52:55 +000036 std::string *StrVal; // This memory must be deleted
37 llvm::ValID ValIDVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +000038
Reid Spencera132e042006-12-03 05:46:11 +000039 llvm::Instruction::BinaryOps BinaryOpVal;
40 llvm::Instruction::TermOps TermOpVal;
41 llvm::Instruction::MemoryOps MemOpVal;
42 llvm::Instruction::CastOps CastOpVal;
43 llvm::Instruction::OtherOps OtherOpVal;
Reid Spencera132e042006-12-03 05:46:11 +000044 llvm::ICmpInst::Predicate IPredicate;
45 llvm::FCmpInst::Predicate FPredicate;
Chris Lattner0275cff2007-08-06 21:00:46 +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 DEPLIBS 308
99#define CALL 309
100#define TAIL 310
101#define ASM_TOK 311
102#define MODULE 312
103#define SIDEEFFECT 313
104#define CC_TOK 314
105#define CCC_TOK 315
106#define FASTCC_TOK 316
107#define COLDCC_TOK 317
108#define X86_STDCALLCC_TOK 318
109#define X86_FASTCALLCC_TOK 319
110#define DATALAYOUT 320
111#define RET 321
112#define BR 322
113#define SWITCH 323
114#define INVOKE 324
115#define UNWIND 325
116#define UNREACHABLE 326
117#define ADD 327
118#define SUB 328
119#define MUL 329
120#define UDIV 330
121#define SDIV 331
122#define FDIV 332
123#define UREM 333
124#define SREM 334
125#define FREM 335
126#define AND 336
127#define OR 337
128#define XOR 338
129#define SHL 339
130#define LSHR 340
131#define ASHR 341
132#define ICMP 342
133#define FCMP 343
134#define EQ 344
135#define NE 345
136#define SLT 346
137#define SGT 347
138#define SLE 348
139#define SGE 349
140#define ULT 350
141#define UGT 351
142#define ULE 352
143#define UGE 353
144#define OEQ 354
145#define ONE 355
146#define OLT 356
147#define OGT 357
148#define OLE 358
149#define OGE 359
150#define ORD 360
151#define UNO 361
152#define UEQ 362
153#define UNE 363
154#define MALLOC 364
155#define ALLOCA 365
156#define FREE 366
157#define LOAD 367
158#define STORE 368
159#define GETELEMENTPTR 369
160#define TRUNC 370
161#define ZEXT 371
162#define SEXT 372
163#define FPTRUNC 373
164#define FPEXT 374
165#define BITCAST 375
166#define UITOFP 376
167#define SITOFP 377
168#define FPTOUI 378
169#define FPTOSI 379
170#define INTTOPTR 380
171#define PTRTOINT 381
172#define PHI_TOK 382
173#define SELECT 383
174#define VAARG 384
175#define EXTRACTELEMENT 385
176#define INSERTELEMENT 386
177#define SHUFFLEVECTOR 387
178#define SIGNEXT 388
179#define ZEROEXT 389
180#define NORETURN 390
181#define INREG 391
182#define SRET 392
183#define NOUNWIND 393
184#define NOALIAS 394
185#define BYVAL 395
186#define NEST 396
187#define DEFAULT 397
188#define HIDDEN 398
189#define PROTECTED 399
190
Reid Spencer68a24bd2005-08-27 18:50:39 +0000191
192extern YYSTYPE llvmAsmlval;