Make function linkage use unmangled names

This commit is contained in:
2024-09-23 23:58:09 +08:00
parent 2b945e4406
commit 96ea861c26
23 changed files with 310 additions and 20 deletions

View File

@@ -30,6 +30,27 @@ enum R3ModuleId : uint8_t {
R3ModId_not_initialized = 0xff,
};
typedef uint32_t cc_type_t;
template <typename T0, typename T1>
inline constexpr cc_type_t CONCAT11(T0 a, T1 b) {
return cc_type_t(a) << 8 | cc_type_t(b);
}
template <typename T0, typename T1>
inline constexpr cc_type_t CONCAT21(T0 a, T1 b) {
return cc_type_t(a) << 8 | cc_type_t(b);
}
template <typename T0, typename T1>
inline constexpr cc_type_t CONCAT22(T0 a, T1 b) {
return cc_type_t(a) << 16 | cc_type_t(b);
}
template <typename T0, typename T1>
inline constexpr cc_type_t CONCAT23(T0 a, T1 b) {
return cc_type_t(a) << 24 | cc_type_t(b);
}
// Can not export enums for some reason
#endif /* A523F6DB_0645_4DEB_8AEB_3792CB732B49 */