summaryrefslogtreecommitdiff
path: root/tools/llvm-upgrade/UpgradeParser.h.cvs
blob: 6bacf8ee458712a5cfbb2371594766665a817665 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
typedef union {
  llvm::Module                           *ModuleVal;
  llvm::Function                         *FunctionVal;
  std::pair<llvm::PATypeInfo, char*>     *ArgVal;
  llvm::BasicBlock                       *BasicBlockVal;
  llvm::TermInstInfo                     TermInstVal;
  llvm::InstrInfo                        InstVal;
  llvm::ConstInfo                        ConstVal;
  llvm::ValueInfo                        ValueVal;
  llvm::PATypeInfo                       TypeVal;
  llvm::TypeInfo                         PrimType;
  llvm::PHIListInfo                      PHIList;
  std::list<llvm::PATypeInfo>            *TypeList;
  std::vector<llvm::ValueInfo>           *ValueList;
  std::vector<llvm::ConstInfo>           *ConstVector;


  std::vector<std::pair<llvm::PATypeInfo,char*> > *ArgList;
  // Represent the RHS of PHI node
  std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;

  llvm::GlobalValue::LinkageTypes         Linkage;
  int64_t                           SInt64Val;
  uint64_t                          UInt64Val;
  int                               SIntVal;
  unsigned                          UIntVal;
  llvm::APFloat                    *FPVal;
  bool                              BoolVal;

  char                             *StrVal;   // This memory is strdup'd!
  llvm::ValID                       ValIDVal; // strdup'd memory maybe!

  llvm::BinaryOps                   BinaryOpVal;
  llvm::TermOps                     TermOpVal;
  llvm::MemoryOps                   MemOpVal;
  llvm::OtherOps                    OtherOpVal;
  llvm::CastOps                     CastOpVal;
  llvm::ICmpInst::Predicate         IPred;
  llvm::FCmpInst::Predicate         FPred;
  llvm::Module::Endianness          Endianness;
} YYSTYPE;
#define	ESINT64VAL	257
#define	EUINT64VAL	258
#define	SINTVAL	259
#define	UINTVAL	260
#define	FPVAL	261
#define	VOID	262
#define	BOOL	263
#define	SBYTE	264
#define	UBYTE	265
#define	SHORT	266
#define	USHORT	267
#define	INT	268
#define	UINT	269
#define	LONG	270
#define	ULONG	271
#define	FLOAT	272
#define	DOUBLE	273
#define	TYPE	274
#define	LABEL	275
#define	VAR_ID	276
#define	LABELSTR	277
#define	STRINGCONSTANT	278
#define	IMPLEMENTATION	279
#define	ZEROINITIALIZER	280
#define	TRUETOK	281
#define	FALSETOK	282
#define	BEGINTOK	283
#define	ENDTOK	284
#define	DECLARE	285
#define	GLOBAL	286
#define	CONSTANT	287
#define	SECTION	288
#define	VOLATILE	289
#define	TO	290
#define	DOTDOTDOT	291
#define	NULL_TOK	292
#define	UNDEF	293
#define	CONST	294
#define	INTERNAL	295
#define	LINKONCE	296
#define	WEAK	297
#define	APPENDING	298
#define	DLLIMPORT	299
#define	DLLEXPORT	300
#define	EXTERN_WEAK	301
#define	OPAQUE	302
#define	NOT	303
#define	EXTERNAL	304
#define	TARGET	305
#define	TRIPLE	306
#define	ENDIAN	307
#define	POINTERSIZE	308
#define	LITTLE	309
#define	BIG	310
#define	ALIGN	311
#define	DEPLIBS	312
#define	CALL	313
#define	TAIL	314
#define	ASM_TOK	315
#define	MODULE	316
#define	SIDEEFFECT	317
#define	CC_TOK	318
#define	CCC_TOK	319
#define	CSRETCC_TOK	320
#define	FASTCC_TOK	321
#define	COLDCC_TOK	322
#define	X86_STDCALLCC_TOK	323
#define	X86_FASTCALLCC_TOK	324
#define	DATALAYOUT	325
#define	RET	326
#define	BR	327
#define	SWITCH	328
#define	INVOKE	329
#define	UNREACHABLE	330
#define	UNWIND	331
#define	EXCEPT	332
#define	ADD	333
#define	SUB	334
#define	MUL	335
#define	DIV	336
#define	UDIV	337
#define	SDIV	338
#define	FDIV	339
#define	REM	340
#define	UREM	341
#define	SREM	342
#define	FREM	343
#define	AND	344
#define	OR	345
#define	XOR	346
#define	SHL	347
#define	SHR	348
#define	ASHR	349
#define	LSHR	350
#define	SETLE	351
#define	SETGE	352
#define	SETLT	353
#define	SETGT	354
#define	SETEQ	355
#define	SETNE	356
#define	ICMP	357
#define	FCMP	358
#define	MALLOC	359
#define	ALLOCA	360
#define	FREE	361
#define	LOAD	362
#define	STORE	363
#define	GETELEMENTPTR	364
#define	PHI_TOK	365
#define	SELECT	366
#define	VAARG	367
#define	EXTRACTELEMENT	368
#define	INSERTELEMENT	369
#define	SHUFFLEVECTOR	370
#define	VAARG_old	371
#define	VANEXT_old	372
#define	EQ	373
#define	NE	374
#define	SLT	375
#define	SGT	376
#define	SLE	377
#define	SGE	378
#define	ULT	379
#define	UGT	380
#define	ULE	381
#define	UGE	382
#define	OEQ	383
#define	ONE	384
#define	OLT	385
#define	OGT	386
#define	OLE	387
#define	OGE	388
#define	ORD	389
#define	UNO	390
#define	UEQ	391
#define	UNE	392
#define	CAST	393
#define	TRUNC	394
#define	ZEXT	395
#define	SEXT	396
#define	FPTRUNC	397
#define	FPEXT	398
#define	FPTOUI	399
#define	FPTOSI	400
#define	UITOFP	401
#define	SITOFP	402
#define	PTRTOINT	403
#define	INTTOPTR	404
#define	BITCAST	405


extern YYSTYPE Upgradelval;