blob: 69d7b9416781968769dc839d432d3edcecc9c464 [file] [log] [blame]
Chris Lattner59c85e92006-10-15 23:27:25 +00001typedef union {
Reid Spencer68a24bd2005-08-27 18:50:39 +00002 llvm::Module *ModuleVal;
3 llvm::Function *FunctionVal;
4 std::pair<llvm::PATypeHolder*, char*> *ArgVal;
5 llvm::BasicBlock *BasicBlockVal;
6 llvm::TerminatorInst *TermInstVal;
7 llvm::Instruction *InstVal;
8 llvm::Constant *ConstVal;
9
10 const llvm::Type *PrimType;
11 llvm::PATypeHolder *TypeVal;
12 llvm::Value *ValueVal;
13
14 std::vector<std::pair<llvm::PATypeHolder*,char*> > *ArgList;
15 std::vector<llvm::Value*> *ValueList;
16 std::list<llvm::PATypeHolder> *TypeList;
17 // Represent the RHS of PHI node
18 std::list<std::pair<llvm::Value*,
19 llvm::BasicBlock*> > *PHIList;
20 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
21 std::vector<llvm::Constant*> *ConstVector;
22
23 llvm::GlobalValue::LinkageTypes Linkage;
24 int64_t SInt64Val;
25 uint64_t UInt64Val;
26 int SIntVal;
27 unsigned UIntVal;
28 double FPVal;
29 bool BoolVal;
30
31 char *StrVal; // This memory is strdup'd!
32 llvm::ValID ValIDVal; // strdup'd memory maybe!
33
34 llvm::Instruction::BinaryOps BinaryOpVal;
35 llvm::Instruction::TermOps TermOpVal;
36 llvm::Instruction::MemoryOps MemOpVal;
37 llvm::Instruction::OtherOps OtherOpVal;
38 llvm::Module::Endianness Endianness;
Reid Spencer5b7e7532006-09-28 19:28:24 +000039} YYSTYPE;
Chris Lattner59c85e92006-10-15 23:27:25 +000040#define ESINT64VAL 257
41#define EUINT64VAL 258
42#define SINTVAL 259
43#define UINTVAL 260
44#define FPVAL 261
45#define VOID 262
46#define BOOL 263
47#define SBYTE 264
48#define UBYTE 265
49#define SHORT 266
50#define USHORT 267
51#define INT 268
52#define UINT 269
53#define LONG 270
54#define ULONG 271
55#define FLOAT 272
56#define DOUBLE 273
57#define TYPE 274
58#define LABEL 275
59#define VAR_ID 276
60#define LABELSTR 277
61#define STRINGCONSTANT 278
62#define IMPLEMENTATION 279
63#define ZEROINITIALIZER 280
64#define TRUETOK 281
65#define FALSETOK 282
66#define BEGINTOK 283
67#define ENDTOK 284
68#define DECLARE 285
69#define GLOBAL 286
70#define CONSTANT 287
71#define SECTION 288
72#define VOLATILE 289
73#define TO 290
74#define DOTDOTDOT 291
75#define NULL_TOK 292
76#define UNDEF 293
77#define CONST 294
78#define INTERNAL 295
79#define LINKONCE 296
80#define WEAK 297
81#define APPENDING 298
82#define DLLIMPORT 299
83#define DLLEXPORT 300
84#define EXTERN_WEAK 301
85#define OPAQUE 302
86#define NOT 303
87#define EXTERNAL 304
88#define TARGET 305
89#define TRIPLE 306
90#define ENDIAN 307
91#define POINTERSIZE 308
92#define LITTLE 309
93#define BIG 310
94#define ALIGN 311
95#define DEPLIBS 312
96#define CALL 313
97#define TAIL 314
98#define ASM_TOK 315
99#define MODULE 316
100#define SIDEEFFECT 317
101#define CC_TOK 318
102#define CCC_TOK 319
103#define CSRETCC_TOK 320
104#define FASTCC_TOK 321
105#define COLDCC_TOK 322
106#define X86_STDCALLCC_TOK 323
107#define X86_FASTCALLCC_TOK 324
108#define RET 325
109#define BR 326
110#define SWITCH 327
111#define INVOKE 328
112#define UNWIND 329
113#define UNREACHABLE 330
114#define ADD 331
115#define SUB 332
116#define MUL 333
117#define DIV 334
118#define REM 335
119#define AND 336
120#define OR 337
121#define XOR 338
122#define SETLE 339
123#define SETGE 340
124#define SETLT 341
125#define SETGT 342
126#define SETEQ 343
127#define SETNE 344
128#define MALLOC 345
129#define ALLOCA 346
130#define FREE 347
131#define LOAD 348
132#define STORE 349
133#define GETELEMENTPTR 350
134#define PHI_TOK 351
135#define CAST 352
136#define SELECT 353
137#define SHL 354
138#define SHR 355
139#define VAARG 356
140#define EXTRACTELEMENT 357
141#define INSERTELEMENT 358
142#define SHUFFLEVECTOR 359
143#define VAARG_old 360
144#define VANEXT_old 361
145
Reid Spencer68a24bd2005-08-27 18:50:39 +0000146
147extern YYSTYPE llvmAsmlval;