Skip to content

Commit 000495c

Browse files
committed
Document that we intentionally mark functions that create metadata as readonly such that they cannot be hoisted above availability checks
1 parent 270d100 commit 000495c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/swift/Runtime/RuntimeFunctions.def

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
//
1616
// Runtime functions that read from object arguments cannot be marked
1717
// ReadNone. Otherwise the objects may be freed before the runtime call.
18+
// Runtime functions that instantiate metadata cannot be marked ReadNone
19+
// or else they could be moved out of blocks controlled by a availability check.
1820
//
1921
//===----------------------------------------------------------------------===//
2022

0 commit comments

Comments
 (0)