mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Remove sret attribute in llvm_abi.cpp
This commit is contained in:
+13
-4
@@ -443,7 +443,10 @@ namespace lbAbi386 {
|
|||||||
case 4: return lb_arg_type_direct(return_type, LLVMIntTypeInContext(c, 32), nullptr, nullptr);
|
case 4: return lb_arg_type_direct(return_type, LLVMIntTypeInContext(c, 32), nullptr, nullptr);
|
||||||
case 8: return lb_arg_type_direct(return_type, LLVMIntTypeInContext(c, 64), nullptr, nullptr);
|
case 8: return lb_arg_type_direct(return_type, LLVMIntTypeInContext(c, 64), nullptr, nullptr);
|
||||||
}
|
}
|
||||||
return lb_arg_type_indirect(return_type, lb_create_enum_attribute(c, "sret", true));
|
LLVMAttributeRef attr = nullptr;
|
||||||
|
// TODO(bill): sret doesn't work correct for LLVM C API
|
||||||
|
// attr = lb_create_enum_attribute(c, "sret", true);
|
||||||
|
return lb_arg_type_indirect(return_type, attr);
|
||||||
}
|
}
|
||||||
return non_struct(c, return_type, true);
|
return non_struct(c, return_type, true);
|
||||||
}
|
}
|
||||||
@@ -601,7 +604,8 @@ namespace lbAbiAmd64SysV {
|
|||||||
if (attribute_kind == Amd64TypeAttribute_ByVal) {
|
if (attribute_kind == Amd64TypeAttribute_ByVal) {
|
||||||
attribute = lb_create_enum_attribute(c, "byval", true);
|
attribute = lb_create_enum_attribute(c, "byval", true);
|
||||||
} else if (attribute_kind == Amd64TypeAttribute_StructRect) {
|
} else if (attribute_kind == Amd64TypeAttribute_StructRect) {
|
||||||
attribute = lb_create_enum_attribute(c, "sret", true);
|
// TODO(bill): sret doesn't work correct for LLVM C API
|
||||||
|
// attribute = lb_create_enum_attribute(c, "sret", true);
|
||||||
}
|
}
|
||||||
return lb_arg_type_indirect(type, attribute);
|
return lb_arg_type_indirect(type, attribute);
|
||||||
} else {
|
} else {
|
||||||
@@ -900,7 +904,10 @@ namespace lbAbiAmd64SysV {
|
|||||||
case 4: return lb_arg_type_direct(return_type, LLVMIntTypeInContext(c, 32), nullptr, nullptr);
|
case 4: return lb_arg_type_direct(return_type, LLVMIntTypeInContext(c, 32), nullptr, nullptr);
|
||||||
case 8: return lb_arg_type_direct(return_type, LLVMIntTypeInContext(c, 64), nullptr, nullptr);
|
case 8: return lb_arg_type_direct(return_type, LLVMIntTypeInContext(c, 64), nullptr, nullptr);
|
||||||
}
|
}
|
||||||
return lb_arg_type_indirect(return_type, lb_create_enum_attribute(c, "sret", true));
|
LLVMAttributeRef attr = nullptr;
|
||||||
|
// TODO(bill): sret doesn't work correct for LLVM C API
|
||||||
|
// attr = lb_create_enum_attribute(c, "sret", true);
|
||||||
|
return lb_arg_type_indirect(return_type, attr);
|
||||||
} else if (build_context.metrics.os == TargetOs_windows && lb_is_type_kind(return_type, LLVMIntegerTypeKind) && lb_sizeof(return_type) == 16) {
|
} else if (build_context.metrics.os == TargetOs_windows && lb_is_type_kind(return_type, LLVMIntegerTypeKind) && lb_sizeof(return_type) == 16) {
|
||||||
return lb_arg_type_direct(return_type, LLVMIntTypeInContext(c, 128), nullptr, nullptr);
|
return lb_arg_type_direct(return_type, LLVMIntTypeInContext(c, 128), nullptr, nullptr);
|
||||||
}
|
}
|
||||||
@@ -1048,7 +1055,9 @@ namespace lbAbiArm64 {
|
|||||||
}
|
}
|
||||||
return lb_arg_type_direct(type, cast_type, nullptr, nullptr);
|
return lb_arg_type_direct(type, cast_type, nullptr, nullptr);
|
||||||
} else {
|
} else {
|
||||||
LLVMAttributeRef attr = lb_create_enum_attribute(c, "sret", true);
|
LLVMAttributeRef attr = nullptr;
|
||||||
|
// TODO(bill): sret doesn't work correct for LLVM C API
|
||||||
|
// attr = lb_create_enum_attribute(c, "sret", true);
|
||||||
return lb_arg_type_indirect(type, attr);
|
return lb_arg_type_indirect(type, attr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -439,7 +439,11 @@ void linker_stage(lbGenerator *gen) {
|
|||||||
// This sets a requirement of Mountain Lion and up, but the compiler doesn't work without this limit.
|
// This sets a requirement of Mountain Lion and up, but the compiler doesn't work without this limit.
|
||||||
// NOTE: If you change this (although this minimum is as low as you can go with Odin working)
|
// NOTE: If you change this (although this minimum is as low as you can go with Odin working)
|
||||||
// make sure to also change the 'mtriple' param passed to 'opt'
|
// make sure to also change the 'mtriple' param passed to 'opt'
|
||||||
|
#if defined(GB_CPU_ARM)
|
||||||
|
" -macosx_version_min 11.0.0 "
|
||||||
|
#else
|
||||||
" -macosx_version_min 10.8.0 "
|
" -macosx_version_min 10.8.0 "
|
||||||
|
#endif
|
||||||
// This points the linker to where the entry point is
|
// This points the linker to where the entry point is
|
||||||
" -e _main "
|
" -e _main "
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user