Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing implementations for GenericAArch64 ABI #1828

Closed
JordanL8 opened this issue Feb 7, 2024 · 0 comments · Fixed by #1829
Closed

Missing implementations for GenericAArch64 ABI #1828

JordanL8 opened this issue Feb 7, 2024 · 0 comments · Fixed by #1829

Comments

@JordanL8
Copy link

JordanL8 commented Feb 7, 2024

There are a few places in Parser.cpp that switch on the target ABI and then only handle Itanium and Microsoft. An assert is raised for unhandled ABIs.

The methods that do this are:

  • Parser::WalkVTable
  • Parser::GetDeclMangledName

Related, I'm unsure if this is a typo or deliberate but ConvertToClangTargetCXXABI uses TargetCXXABI::GenericARM for AppAbi::AArch64 instead of TargetCXXABI::GenericAArch64.

ConvertToClangTargetCXXABI
static clang::TargetCXXABI::Kind
ConvertToClangTargetCXXABI(CppSharp::CppParser::AST::CppAbi abi)
{
    using namespace clang;

    switch (abi)
    {
    case CppSharp::CppParser::AST::CppAbi::Itanium:
        return TargetCXXABI::GenericItanium;
    case CppSharp::CppParser::AST::CppAbi::Microsoft:
        return TargetCXXABI::Microsoft;
    case CppSharp::CppParser::AST::CppAbi::ARM:
        return TargetCXXABI::GenericARM;
    case CppSharp::CppParser::AST::CppAbi::AArch64:
        return TargetCXXABI::GenericARM;
    case CppSharp::CppParser::AST::CppAbi::iOS:
        return TargetCXXABI::iOS;
    case CppSharp::CppParser::AST::CppAbi::AppleARM64:
        return TargetCXXABI::AppleARM64;
    }

    llvm_unreachable("Unsupported C++ ABI.");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant