File tree Expand file tree Collapse file tree 12 files changed +72
-0
lines changed Expand file tree Collapse file tree 12 files changed +72
-0
lines changed Original file line number Diff line number Diff line change @@ -49,3 +49,9 @@ public struct ArrayType: IRType {
49
49
return LLVMArrayType ( elementType. asLLVM ( ) , UInt32 ( count) )
50
50
}
51
51
}
52
+
53
+ extension ArrayType : Equatable {
54
+ public static func == ( lhs: ArrayType , rhs: ArrayType ) -> Bool {
55
+ return lhs. asLLVM ( ) == rhs. asLLVM ( )
56
+ }
57
+ }
Original file line number Diff line number Diff line change @@ -85,3 +85,9 @@ public struct FloatType: IRType {
85
85
}
86
86
}
87
87
}
88
+
89
+ extension FloatType : Equatable {
90
+ public static func == ( lhs: FloatType , rhs: FloatType ) -> Bool {
91
+ return lhs. asLLVM ( ) == rhs. asLLVM ( )
92
+ }
93
+ }
Original file line number Diff line number Diff line change @@ -38,3 +38,9 @@ public struct FunctionType: IRType {
38
38
}
39
39
}
40
40
}
41
+
42
+ extension FunctionType : Equatable {
43
+ public static func == ( lhs: FunctionType , rhs: FunctionType ) -> Bool {
44
+ return lhs. asLLVM ( ) == rhs. asLLVM ( )
45
+ }
46
+ }
Original file line number Diff line number Diff line change @@ -100,3 +100,9 @@ public struct IntType: IRType {
100
100
return LLVMIntTypeInContext ( context. llvm, UInt32 ( width) )
101
101
}
102
102
}
103
+
104
+ extension IntType : Equatable {
105
+ public static func == ( lhs: IntType , rhs: IntType ) -> Bool {
106
+ return lhs. asLLVM ( ) == rhs. asLLVM ( )
107
+ }
108
+ }
Original file line number Diff line number Diff line change @@ -21,3 +21,9 @@ public struct LabelType: IRType {
21
21
return LLVMLabelTypeInContext ( context. llvm)
22
22
}
23
23
}
24
+
25
+ extension LabelType : Equatable {
26
+ public static func == ( lhs: LabelType , rhs: LabelType ) -> Bool {
27
+ return lhs. asLLVM ( ) == rhs. asLLVM ( )
28
+ }
29
+ }
Original file line number Diff line number Diff line change @@ -21,3 +21,9 @@ public struct MetadataType: IRType {
21
21
return LLVMMetadataTypeInContext ( context. llvm)
22
22
}
23
23
}
24
+
25
+ extension MetadataType : Equatable {
26
+ public static func == ( lhs: MetadataType , rhs: MetadataType ) -> Bool {
27
+ return lhs. asLLVM ( ) == rhs. asLLVM ( )
28
+ }
29
+ }
Original file line number Diff line number Diff line change @@ -43,3 +43,9 @@ public struct PointerType: IRType {
43
43
return LLVMPointerType ( pointee. asLLVM ( ) , UInt32 ( addressSpace) )
44
44
}
45
45
}
46
+
47
+ extension PointerType : Equatable {
48
+ public static func == ( lhs: PointerType , rhs: PointerType ) -> Bool {
49
+ return lhs. asLLVM ( ) == rhs. asLLVM ( )
50
+ }
51
+ }
Original file line number Diff line number Diff line change @@ -134,3 +134,9 @@ public struct StructType: IRType {
134
134
return LLVMIsPackedStruct ( self . llvm) != 0
135
135
}
136
136
}
137
+
138
+ extension StructType : Equatable {
139
+ public static func == ( lhs: StructType , rhs: StructType ) -> Bool {
140
+ return lhs. asLLVM ( ) == rhs. asLLVM ( )
141
+ }
142
+ }
Original file line number Diff line number Diff line change @@ -22,3 +22,9 @@ public struct TokenType: IRType {
22
22
return LLVMTokenTypeInContext ( context. llvm)
23
23
}
24
24
}
25
+
26
+ extension TokenType : Equatable {
27
+ public static func == ( lhs: TokenType , rhs: TokenType ) -> Bool {
28
+ return lhs. asLLVM ( ) == rhs. asLLVM ( )
29
+ }
30
+ }
Original file line number Diff line number Diff line change @@ -44,3 +44,9 @@ public struct VectorType: IRType {
44
44
return LLVMVectorType ( elementType. asLLVM ( ) , UInt32 ( count) )
45
45
}
46
46
}
47
+
48
+ extension VectorType : Equatable {
49
+ public static func == ( lhs: VectorType , rhs: VectorType ) -> Bool {
50
+ return lhs. asLLVM ( ) == rhs. asLLVM ( )
51
+ }
52
+ }
Original file line number Diff line number Diff line change @@ -21,3 +21,9 @@ public struct VoidType: IRType {
21
21
return LLVMVoidTypeInContext ( context. llvm)
22
22
}
23
23
}
24
+
25
+ extension VoidType : Equatable {
26
+ public static func == ( lhs: VoidType , rhs: VoidType ) -> Bool {
27
+ return lhs. asLLVM ( ) == rhs. asLLVM ( )
28
+ }
29
+ }
Original file line number Diff line number Diff line change @@ -26,3 +26,9 @@ public struct X86MMXType: IRType {
26
26
return LLVMX86MMXTypeInContext ( context. llvm)
27
27
}
28
28
}
29
+
30
+ extension X86MMXType : Equatable {
31
+ public static func == ( lhs: X86MMXType , rhs: X86MMXType ) -> Bool {
32
+ return lhs. asLLVM ( ) == rhs. asLLVM ( )
33
+ }
34
+ }
You can’t perform that action at this time.
0 commit comments