-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclassEnum.py
More file actions
49 lines (43 loc) · 787 Bytes
/
classEnum.py
File metadata and controls
49 lines (43 loc) · 787 Bytes
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
from enum import Enum
class llvmEnum(Enum):
Alloca = 0
GlobalString = 1
ClassType = 2
Load = 3
Return = 4
ReturnVoid = 5
GlobalVar = 6
Getelementptr1 = 7
Getelementptr2 = 8
Label = 9
Jump = 10
Trunc = 11
Br = 12
Zext = 13
Phi = 14
Icmp = 15
Store = 16
Binary = 17
FuncCall = 18
FuncVoid = 19
Pass = 20
def __eq__(self, other):
return self.value == other.value
class lrEnum(Enum):
mv = 0
lw = 1
label = 2
binary = 3
li = 4
ret = 5
call = 6
sw = 7
lui = 8
icmp = 9
j = 10
bnez = 11
binaryi = 12
def __eq__(self, other):
if type(other).__name__ != 'lrEnum':
return False
return self.value == other.value