mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-14 15:16:07 +03:00
AArch64: Populate a struct's argTypes
The only observable effect for now is that non-Apple AArch64 TypeInfo_Struct emissions might contain a populated m_arg1, which is a prerequisite for TypeInfo-based core.vararg.va_arg().
This commit is contained in:
parent
a994c6b87a
commit
6d7819f8c6
1 changed files with 7 additions and 2 deletions
|
@ -26,6 +26,8 @@ using llvm::APFloat;
|
|||
TypeTuple *toArgTypes(Type *t);
|
||||
// in dmd/argtypes_sysv_x64.d:
|
||||
TypeTuple *toArgTypes_sysv_x64(Type *t);
|
||||
// in dmd/argtypes_aarch64.d:
|
||||
TypeTuple *toArgTypes_aarch64(Type *t);
|
||||
|
||||
namespace {
|
||||
/******************************
|
||||
|
@ -200,10 +202,13 @@ const char *TargetCPP::typeMangle(Type *t) {
|
|||
|
||||
TypeTuple *Target::toArgTypes(Type *t) {
|
||||
const auto &triple = *global.params.targetTriple;
|
||||
if (triple.getArch() == llvm::Triple::x86)
|
||||
const auto arch = triple.getArch();
|
||||
if (arch == llvm::Triple::x86)
|
||||
return ::toArgTypes(t);
|
||||
if (triple.getArch() == llvm::Triple::x86_64 && !triple.isOSWindows())
|
||||
if (arch == llvm::Triple::x86_64 && !triple.isOSWindows())
|
||||
return toArgTypes_sysv_x64(t);
|
||||
if (arch == llvm::Triple::aarch64 || arch == llvm::Triple::aarch64_be)
|
||||
return toArgTypes_aarch64(t);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue