mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Emit calls to swift_willThrow as part of SILGen using a builtin.
Calls to willThrow are marked as read-none so that the optimizer can remove them. The willThrow builtin is still generated for all throw/rethrow sites, but I plan to look at this next. rdar://20356658 Swift SVN r27877
This commit is contained in:
@@ -285,6 +285,18 @@ BUILTIN_SIL_OPERATION(FixLifetime, "fixLifetime", Special)
|
||||
|
||||
#undef BUILTIN_SIL_OPERATION
|
||||
|
||||
// BUILTIN_RUNTIME_CALL - A call into a runtime function.
|
||||
// These functions accept a single argument of any type.
|
||||
#ifndef BUILTIN_RUNTIME_CALL
|
||||
#define BUILTIN_RUNTIME_CALL(Id, Name, Attrs) \
|
||||
BUILTIN(Id, Name, Attrs)
|
||||
#endif
|
||||
|
||||
/// willThrow: T -> ()
|
||||
BUILTIN_RUNTIME_CALL(WillThrow, "willThrow", "n")
|
||||
|
||||
#undef BUILTIN_RUNTIME_CALL
|
||||
|
||||
// BUILTIN_MISC_OPERATION - Miscellaneous operations without a unifying class.
|
||||
// These have various types.
|
||||
#ifndef BUILTIN_MISC_OPERATION
|
||||
|
||||
Reference in New Issue
Block a user