SIL: make a linkage mismatch during de-serialization a human readable diagnostic

Although this error can only happen when tinkering with the stdlib's runtime functions, it's nice to get a readable error message. So far, the compiler just crashed later without a hint to the original problem.
This commit is contained in:
Erik Eckstein
2025-11-21 11:47:46 +01:00
parent 95d5b5da33
commit 9d02917087
2 changed files with 25 additions and 2 deletions

View File

@@ -142,6 +142,10 @@ ERROR(deserialize_function_type_mismatch,Fatal,
"type mismatch of function '%0', declared as %1 but used in a swift module as %2",
(StringRef, Type, Type))
ERROR(deserialize_function_linkage_mismatch,Fatal,
"linkage mismatch of function '%0', declared as %1 but expected as %2",
(StringRef, StringRef, StringRef))
ERROR(without_actually_escaping_on_isolated_any,none,
"withoutActuallyEscaping is currently unimplemented for '@isolated(any)' "
"function values", ())