[6.2][Runtime] Add function_cast, switch from std::bit_cast.

Function types aren't always trivially copyable, e.g. with address-discriminated signed pointers on ARM64e. Introduce a function_cast helper and use that instead.

(cherry picked from commit 185b739cf1)
This commit is contained in:
Mike Ash
2025-04-03 20:40:55 -04:00
parent 7d77c615b3
commit b2d6514b63
10 changed files with 75 additions and 65 deletions

View File

@@ -18,6 +18,7 @@
// DEP: _exit
// DEP: _free
// DEP: _malloc
// DEP: _memcpy
// DEP: _memmove
// DEP: _memset
// DEP: _memset_s