Make the ABI changes only affect windows

TODO: decide upon rules for *nix systems
This commit is contained in:
Ginger Bill
2017-04-17 12:01:04 +01:00
parent a213061f33
commit 6d9fadf351
+6
View File
@@ -1016,6 +1016,8 @@ Type *check_get_results(Checker *c, Scope *scope, AstNode *_results) {
Type *type_to_abi_compat_param_type(gbAllocator a, Type *original_type) { Type *type_to_abi_compat_param_type(gbAllocator a, Type *original_type) {
Type *new_type = original_type; Type *new_type = original_type;
if (str_eq(build_context.ODIN_OS, str_lit("windows"))) {
// NOTE(bill): Changing the passing parameter value type is to match C's ABI // NOTE(bill): Changing the passing parameter value type is to match C's ABI
// IMPORTANT TODO(bill): This only matches the ABI on MSVC at the moment // IMPORTANT TODO(bill): This only matches the ABI on MSVC at the moment
// SEE: https://msdn.microsoft.com/en-us/library/zthk2dkh.aspx // SEE: https://msdn.microsoft.com/en-us/library/zthk2dkh.aspx
@@ -1055,6 +1057,10 @@ Type *type_to_abi_compat_param_type(gbAllocator a, Type *original_type) {
} }
} break; } break;
} }
} else {
// IMPORTANT TODO(bill): figure out the ABI settings for Linux, OSX etc. for
// their architectures
}
return new_type; return new_type;
} }