blob: 7122ae4cfaf5b9e4ae6096d6c24a5bcca89b2b1c [file] [log] [blame]
Chris Lattner8335e842006-01-23 23:05:42 +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;
39} YYSTYPE;
Chris Lattner8335e842006-01-23 23:05:42 +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 OPAQUE 299
83#define NOT 300
84#define EXTERNAL 301
85#define TARGET 302
86#define TRIPLE 303
87#define ENDIAN 304
88#define POINTERSIZE 305
89#define LITTLE 306
90#define BIG 307
91#define ALIGN 308
92#define DEPLIBS 309
93#define CALL 310
94#define TAIL 311
95#define ASM_TOK 312
96#define CC_TOK 313
97#define CCC_TOK 314
98#define FASTCC_TOK 315
99#define COLDCC_TOK 316
100#define RET 317
101#define BR 318
102#define SWITCH 319
103#define INVOKE 320
104#define UNWIND 321
105#define UNREACHABLE 322
106#define ADD 323
107#define SUB 324
108#define MUL 325
109#define DIV 326
110#define REM 327
111#define AND 328
112#define OR 329
113#define XOR 330
114#define SETLE 331
115#define SETGE 332
116#define SETLT 333
117#define SETGT 334
118#define SETEQ 335
119#define SETNE 336
120#define MALLOC 337
121#define ALLOCA 338
122#define FREE 339
123#define LOAD 340
124#define STORE 341
125#define GETELEMENTPTR 342
126#define PHI_TOK 343
127#define CAST 344
128#define SELECT 345
129#define SHL 346
130#define SHR 347
131#define VAARG 348
132#define EXTRACTELEMENT 349
133#define INSERTELEMENT 350
134#define VAARG_old 351
135#define VANEXT_old 352
136
Reid Spencer68a24bd2005-08-27 18:50:39 +0000137
138extern YYSTYPE llvmAsmlval;