blob: a242ab119681c1e5f3553f48996ed7c37aba6c6a [file] [log] [blame]
Christopher Lamb5c104242007-04-22 20:09:11 +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
36 char *StrVal; // This memory is strdup'd!
Reid Spencer1628cec2006-10-26 06:15:43 +000037 llvm::ValID ValIDVal; // strdup'd memory maybe!
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;
Reid Spencer7780acb2007-04-16 06:56:07 +000046} YYSTYPE;
Christopher Lamb5c104242007-04-22 20:09:11 +000047#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 LABEL 268
59#define TYPE 269
60#define LOCALVAR 270
61#define GLOBALVAR 271
62#define LABELSTR 272
63#define STRINGCONSTANT 273
64#define ATSTRINGCONSTANT 274
65#define ZEROINITIALIZER 275
66#define TRUETOK 276
67#define FALSETOK 277
68#define BEGINTOK 278
69#define ENDTOK 279
70#define DECLARE 280
71#define DEFINE 281
72#define GLOBAL 282
73#define CONSTANT 283
74#define SECTION 284
75#define VOLATILE 285
76#define THREAD_LOCAL 286
77#define TO 287
78#define DOTDOTDOT 288
79#define NULL_TOK 289
80#define UNDEF 290
81#define INTERNAL 291
82#define LINKONCE 292
83#define WEAK 293
84#define APPENDING 294
85#define DLLIMPORT 295
86#define DLLEXPORT 296
87#define EXTERN_WEAK 297
88#define OPAQUE 298
89#define EXTERNAL 299
90#define TARGET 300
91#define TRIPLE 301
92#define ALIGN 302
93#define DEPLIBS 303
94#define CALL 304
95#define TAIL 305
96#define ASM_TOK 306
97#define MODULE 307
98#define SIDEEFFECT 308
99#define CC_TOK 309
100#define CCC_TOK 310
101#define FASTCC_TOK 311
102#define COLDCC_TOK 312
103#define X86_STDCALLCC_TOK 313
104#define X86_FASTCALLCC_TOK 314
105#define DATALAYOUT 315
106#define RET 316
107#define BR 317
108#define SWITCH 318
109#define INVOKE 319
110#define UNWIND 320
111#define UNREACHABLE 321
112#define ADD 322
113#define SUB 323
114#define MUL 324
115#define UDIV 325
116#define SDIV 326
117#define FDIV 327
118#define UREM 328
119#define SREM 329
120#define FREM 330
121#define AND 331
122#define OR 332
123#define XOR 333
124#define SHL 334
125#define LSHR 335
126#define ASHR 336
127#define ICMP 337
128#define FCMP 338
129#define EQ 339
130#define NE 340
131#define SLT 341
132#define SGT 342
133#define SLE 343
134#define SGE 344
135#define ULT 345
136#define UGT 346
137#define ULE 347
138#define UGE 348
139#define OEQ 349
140#define ONE 350
141#define OLT 351
142#define OGT 352
143#define OLE 353
144#define OGE 354
145#define ORD 355
146#define UNO 356
147#define UEQ 357
148#define UNE 358
149#define MALLOC 359
150#define ALLOCA 360
151#define FREE 361
152#define LOAD 362
153#define STORE 363
154#define GETELEMENTPTR 364
155#define TRUNC 365
156#define ZEXT 366
157#define SEXT 367
158#define FPTRUNC 368
159#define FPEXT 369
160#define BITCAST 370
161#define UITOFP 371
162#define SITOFP 372
163#define FPTOUI 373
164#define FPTOSI 374
165#define INTTOPTR 375
166#define PTRTOINT 376
167#define PHI_TOK 377
168#define SELECT 378
169#define VAARG 379
170#define EXTRACTELEMENT 380
171#define INSERTELEMENT 381
172#define SHUFFLEVECTOR 382
173#define NORETURN 383
174#define INREG 384
175#define SRET 385
176#define NOUNWIND 386
177#define DEFAULT 387
178#define HIDDEN 388
179
Reid Spencer68a24bd2005-08-27 18:50:39 +0000180
181extern YYSTYPE llvmAsmlval;