Skip to content

Commit 8841d6d

Browse files
committed
[gardening] Add a comment to BUILTIN_MISC_OPERATION_WITH_SILGEN that explains how to use it/contrasts with BUILTIN_SIL_OPERATION.
1 parent 956b9f2 commit 8841d6d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/swift/AST/Builtins.def

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,12 @@ BUILTIN_MISC_OPERATION(PoundAssert, "poundAssert", "", Special)
634634

635635
// BUILTIN_MISC_OPERATION_WITH_SILGEN - Miscellaneous operations that are
636636
// specially emitted during SIL generation.
637+
//
638+
// The intention is that this is meant for builtins that need a named
639+
// builtin representation so one can create a builtin instruction in
640+
// SIL, but that also need special SILGen behavior. If an operation
641+
// just emits custom SIL and does not need to be able to form a
642+
// builtin instruction, please use BUILTIN_SIL_OPERATION.
637643
#ifndef BUILTIN_MISC_OPERATION_WITH_SILGEN
638644
#define BUILTIN_MISC_OPERATION_WITH_SILGEN(Id, Name, Attrs, Overload) \
639645
BUILTIN_MISC_OPERATION(Id, Name, Attrs, Overload)

0 commit comments

Comments
 (0)