@@ -38,8 +38,6 @@ BUILTIN_CAST_OPERATION(PtrToInt, "ptrtoint", "n")
38
38
BUILTIN_CAST_OPERATION(IntToPtr, " inttoptr" , " n" )
39
39
BUILTIN_CAST_OPERATION(BitCast , " bitcast" , " n" )
40
40
41
- #undef BUILTIN_CAST_OPERATION
42
-
43
41
// / Cast-or-bitcast operations have type T1 -> T2.
44
42
// / T1 and T2 may be the same size, unlike the corresponding true casts.
45
43
#ifndef BUILTIN_CAST_OR_BITCAST_OPERATION
@@ -48,7 +46,6 @@ BUILTIN_CAST_OPERATION(BitCast , "bitcast", "n")
48
46
BUILTIN_CAST_OR_BITCAST_OPERATION (TruncOrBitCast, " truncOrBitCast" , " n" )
49
47
BUILTIN_CAST_OR_BITCAST_OPERATION(ZExtOrBitCast, " zextOrBitCast" , " n" )
50
48
BUILTIN_CAST_OR_BITCAST_OPERATION(SExtOrBitCast, " sextOrBitCast" , " n" )
51
- #undef BUILTIN_CAST_OR_BITCAST_OPERATION
52
49
53
50
// / Binary operations have type (T,T) -> T.
54
51
// /
@@ -139,11 +136,6 @@ BUILTIN_BINARY_OPERATION_ALL(URem, urem, "n", Integer)
139
136
BUILTIN_BINARY_OPERATION_ALL(FRem, frem, " n" , FloatOrVector)
140
137
BUILTIN_BINARY_OPERATION_ALL(Xor, xor , " n" , IntegerOrVector)
141
138
BUILTIN_BINARY_OPERATION_OVERLOADED_STATIC(Expect, " int_expect" , " n" , Integer)
142
- #undef BUILTIN_BINARY_OPERATION_ALL
143
- #undef BUILTIN_BINARY_OPERATION_POLYMORPHIC
144
- #undef BUILTIN_BINARY_OPERATION_OVERLOADED_STATIC
145
- #undef BUILTIN_BINARY_OPERATION_GENERIC_HELPER_STR
146
- #undef BUILTIN_BINARY_OPERATION
147
139
148
140
// / These builtins are analogous the similarly named llvm intrinsics. The
149
141
// / difference between the two is that these are not expected to overflow,
@@ -165,7 +157,6 @@ BUILTIN_BINARY_OPERATION_WITH_OVERFLOW(SMulOver,
165
157
" smul_with_overflow" , Mul, " n" , Integer)
166
158
BUILTIN_BINARY_OPERATION_WITH_OVERFLOW(UMulOver,
167
159
" umul_with_overflow" , Mul, " n" , Integer)
168
- #undef BUILTIN_BINARY_OPERATION_WITH_OVERFLOW
169
160
170
161
// / Unary operations have type (T) -> T.
171
162
#ifndef BUILTIN_UNARY_OPERATION
@@ -185,8 +176,6 @@ BUILTIN_UNARY_OPERATION(AssumeNonNegative, "assumeNonNegative", "n", Integer)
185
176
// It only works on i1.
186
177
BUILTIN_UNARY_OPERATION(AssumeTrue, " assume" , " " , Integer)
187
178
188
- #undef BUILTIN_UNARY_OPERATION
189
-
190
179
// Binary predicates have type (T,T) -> i1 or (T, T) -> Vector<i1> for scalars
191
180
// and vectors, respectively.
192
181
#ifndef BUILTIN_BINARY_PREDICATE
@@ -217,7 +206,6 @@ BUILTIN_BINARY_PREDICATE(FCMP_ULT, "fcmp_ult", "n", FloatOrVector)
217
206
BUILTIN_BINARY_PREDICATE(FCMP_ULE, " fcmp_ule" , " n" , FloatOrVector)
218
207
BUILTIN_BINARY_PREDICATE(FCMP_UNE, " fcmp_une" , " n" , FloatOrVector)
219
208
BUILTIN_BINARY_PREDICATE(FCMP_UNO, " fcmp_uno" , " n" , FloatOrVector)
220
- #undef BUILTIN_BINARY_PREDICATE
221
209
222
210
// BUILTIN_SIL_OPERATION - Operations that can be lowered to SIL instructions.
223
211
// These have various types.
@@ -549,8 +537,6 @@ BUILTIN_SIL_OPERATION(HopToActor, "hopToActor", None)
549
537
// / Returns the number of items in a pack.
550
538
BUILTIN_SIL_OPERATION(PackLength, " packLength" , Special)
551
539
552
- #undef BUILTIN_SIL_OPERATION
553
-
554
540
// BUILTIN_RUNTIME_CALL - A call into a runtime function.
555
541
// These functions accept a single argument of any type.
556
542
#ifndef BUILTIN_RUNTIME_CALL
@@ -569,8 +555,6 @@ BUILTIN_RUNTIME_CALL(ErrorInMain, "errorInMain", "")
569
555
// / nominal type is Optional.
570
556
BUILTIN_RUNTIME_CALL(IsOptionalType, " isOptional" , " " )
571
557
572
- #undef BUILTIN_RUNTIME_CALL
573
-
574
558
// BUILTIN_MISC_OPERATION - Miscellaneous operations without a unifying class.
575
559
// These have various types.
576
560
#ifndef BUILTIN_MISC_OPERATION
@@ -976,7 +960,7 @@ BUILTIN_MISC_OPERATION(UnprotectedAddressOfBorrowOpaque, "unprotectedAddressOfBo
976
960
// / Create a new asynchronous task, given flags, options, and a function to
977
961
// / execute.
978
962
BUILTIN_MISC_OPERATION_WITH_SILGEN(CreateAsyncTask,
979
- " createAsyncTask" , " " , Special)
963
+ " createAsyncTask" , " " , Special)
980
964
981
965
// / createAsyncTaskInGroup(): (
982
966
// / Int, // flags
@@ -986,8 +970,8 @@ BUILTIN_MISC_OPERATION_WITH_SILGEN(CreateAsyncTask,
986
970
// /
987
971
// / Create a new asynchronous task future, given flags, a parent task,
988
972
// / task group and a function to execute.
989
- BUILTIN_MISC_OPERATION_WITH_SILGEN (CreateAsyncTaskInGroup,
990
- " createAsyncTaskInGroup " , " " , Special)
973
+ BUILTIN_SIL_OPERATION (CreateAsyncTaskInGroup,
974
+ " createAsyncTaskInGroup " , Special)
991
975
992
976
// / createAsyncDiscardingTaskInGroup(): (
993
977
// / Int, // flags
@@ -997,8 +981,8 @@ BUILTIN_MISC_OPERATION_WITH_SILGEN(CreateAsyncTaskInGroup,
997
981
// /
998
982
// / Create a new asynchronous discarding task, given flags, a parent task,
999
983
// / task group and a function to execute.
1000
- BUILTIN_MISC_OPERATION_WITH_SILGEN (CreateAsyncDiscardingTaskInGroup,
1001
- " createAsyncDiscardingTaskInGroup " , " " , Special)
984
+ BUILTIN_SIL_OPERATION (CreateAsyncDiscardingTaskInGroup,
985
+ " createAsyncDiscardingTaskInGroup " , Special)
1002
986
1003
987
// / createAsyncTaskWithExecutor(): (
1004
988
// / Int, // flags
@@ -1008,8 +992,8 @@ BUILTIN_MISC_OPERATION_WITH_SILGEN(CreateAsyncDiscardingTaskInGroup,
1008
992
// /
1009
993
// / Create a new asynchronous task future, given flags, a parent task,
1010
994
// / task group and a function to execute.
1011
- BUILTIN_MISC_OPERATION_WITH_SILGEN (CreateAsyncTaskWithExecutor,
1012
- " createAsyncTaskWithExecutor " , " " , Special)
995
+ BUILTIN_SIL_OPERATION (CreateAsyncTaskWithExecutor,
996
+ " createAsyncTaskWithExecutor " , Special)
1013
997
1014
998
// / createAsyncTaskInGroupWithExecutor(): (
1015
999
// / Int, // flags
@@ -1020,8 +1004,8 @@ BUILTIN_MISC_OPERATION_WITH_SILGEN(CreateAsyncTaskWithExecutor,
1020
1004
// /
1021
1005
// / Create a new asynchronous task future, given flags, a parent task,
1022
1006
// / task group and a function to execute.
1023
- BUILTIN_MISC_OPERATION_WITH_SILGEN (CreateAsyncTaskInGroupWithExecutor,
1024
- " createAsyncTaskInGroupWithExecutor " , " " , Special)
1007
+ BUILTIN_SIL_OPERATION (CreateAsyncTaskInGroupWithExecutor,
1008
+ " createAsyncTaskInGroupWithExecutor " , Special)
1025
1009
1026
1010
// / createAsyncDiscardingTaskInGroupWithExecutor(): (
1027
1011
// / Int, // flags
@@ -1032,8 +1016,8 @@ BUILTIN_MISC_OPERATION_WITH_SILGEN(CreateAsyncTaskInGroupWithExecutor,
1032
1016
// /
1033
1017
// / Create a new asynchronous discarding task, given flags, a parent task,
1034
1018
// / task group and a function to execute.
1035
- BUILTIN_MISC_OPERATION_WITH_SILGEN (CreateAsyncDiscardingTaskInGroupWithExecutor,
1036
- " createAsyncDiscardingTaskInGroupWithExecutor " , " " , Special)
1019
+ BUILTIN_SIL_OPERATION (CreateAsyncDiscardingTaskInGroupWithExecutor,
1020
+ " createAsyncDiscardingTaskInGroupWithExecutor " , Special)
1037
1021
1038
1022
// / Build a Builtin.Executor value from an "ordinary" task executor
1039
1023
// / reference.
@@ -1102,10 +1086,6 @@ BUILTIN_MISC_OPERATION_WITH_SILGEN(InjectEnumTag, "injectEnumTag", "", Special)
1102
1086
// / `any Actor` existential that refers to the local actor.
1103
1087
BUILTIN_MISC_OPERATION_WITH_SILGEN(DistributedActorAsAnyActor, " distributedActorAsAnyActor" , " n" , Special)
1104
1088
1105
- #undef BUILTIN_MISC_OPERATION_WITH_SILGEN
1106
-
1107
- #undef BUILTIN_MISC_OPERATION
1108
-
1109
1089
// / Builtins for instrumentation added by sanitizers during SILGen.
1110
1090
#ifndef BUILTIN_SANITIZER_OPERATION
1111
1091
#define BUILTIN_SANITIZER_OPERATION (Id, Name, Attrs ) BUILTIN(Id, Name, Attrs)
@@ -1115,8 +1095,6 @@ BUILTIN_MISC_OPERATION_WITH_SILGEN(DistributedActorAsAnyActor, "distributedActor
1115
1095
// / TSanInoutAccess has type (T) -> ()
1116
1096
BUILTIN_SANITIZER_OPERATION (TSanInoutAccess, " tsanInoutAccess" , " " )
1117
1097
1118
- #undef BUILTIN_SANITIZER_OPERATION
1119
-
1120
1098
// / Builtins for compile-time type-checking operations used for unit testing.
1121
1099
#ifndef BUILTIN_TYPE_CHECKER_OPERATION
1122
1100
#define BUILTIN_TYPE_CHECKER_OPERATION (Id, Name ) BUILTIN(Id, #Name, " n" )
@@ -1127,8 +1105,6 @@ BUILTIN_TYPE_CHECKER_OPERATION(TypeJoinInout, type_join_inout)
1127
1105
BUILTIN_TYPE_CHECKER_OPERATION(TypeJoinMeta, type_join_meta)
1128
1106
BUILTIN_TYPE_CHECKER_OPERATION(TriggerFallbackDiagnostic, trigger_fallback_diagnostic)
1129
1107
1130
- #undef BUILTIN_TYPE_CHECKER_OPERATION
1131
-
1132
1108
// BUILTIN_TYPE_TRAIT_OPERATION - Compile-time type trait operations.
1133
1109
#ifndef BUILTIN_TYPE_TRAIT_OPERATION
1134
1110
#define BUILTIN_TYPE_TRAIT_OPERATION (Id, Name ) \
@@ -1142,5 +1118,20 @@ BUILTIN_TYPE_CHECKER_OPERATION(TriggerFallbackDiagnostic, trigger_fallback_diagn
1142
1118
BUILTIN_TYPE_TRAIT_OPERATION (CanBeObjCClass, canBeClass)
1143
1119
1144
1120
#undef BUILTIN_TYPE_TRAIT_OPERATION
1145
-
1121
+ #undef BUILTIN_UNARY_OPERATION
1122
+ #undef BUILTIN_BINARY_PREDICATE
1123
+ #undef BUILTIN_RUNTIME_CALL
1124
+ #undef BUILTIN_MISC_OPERATION_WITH_SILGEN
1125
+ #undef BUILTIN_MISC_OPERATION
1126
+ #undef BUILTIN_SANITIZER_OPERATION
1127
+ #undef BUILTIN_TYPE_CHECKER_OPERATION
1128
+ #undef BUILTIN_BINARY_OPERATION_WITH_OVERFLOW
1129
+ #undef BUILTIN_BINARY_OPERATION_ALL
1130
+ #undef BUILTIN_BINARY_OPERATION_POLYMORPHIC
1131
+ #undef BUILTIN_BINARY_OPERATION_OVERLOADED_STATIC
1132
+ #undef BUILTIN_BINARY_OPERATION_GENERIC_HELPER_STR
1133
+ #undef BUILTIN_BINARY_OPERATION
1134
+ #undef BUILTIN_CAST_OPERATION
1135
+ #undef BUILTIN_CAST_OR_BITCAST_OPERATION
1136
+ #undef BUILTIN_SIL_OPERATION
1146
1137
#undef BUILTIN
0 commit comments