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