From 099fadb9a1c1b8889222e4d364c25ba5215add00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Matos?= Date: Thu, 8 Feb 2024 17:02:09 +0000 Subject: [PATCH] ABI handling fixes in Parser.cpp (#1829) * ABI handling fixes in Parser.cpp * Update Parser.cpp --- src/CppParser/Parser.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/CppParser/Parser.cpp b/src/CppParser/Parser.cpp index 1edc0850c..ac6fbf5de 100644 --- a/src/CppParser/Parser.cpp +++ b/src/CppParser/Parser.cpp @@ -234,7 +234,7 @@ ConvertToClangTargetCXXABI(CppSharp::CppParser::AST::CppAbi abi) case CppSharp::CppParser::AST::CppAbi::ARM: return TargetCXXABI::GenericARM; case CppSharp::CppParser::AST::CppAbi::AArch64: - return TargetCXXABI::GenericARM; + return TargetCXXABI::GenericAArch64; case CppSharp::CppParser::AST::CppAbi::iOS: return TargetCXXABI::iOS; case CppSharp::CppParser::AST::CppAbi::AppleARM64: @@ -731,7 +731,7 @@ void Parser::WalkVTable(const clang::CXXRecordDecl* RD, Class* C) } break; } - case TargetCXXABI::GenericItanium: + default: { ItaniumVTableContext VTContext(AST); @@ -739,8 +739,6 @@ void Parser::WalkVTable(const clang::CXXRecordDecl* RD, Class* C) C->layout->layout = WalkVTableLayout(VTLayout); break; } - default: - llvm_unreachable("Unsupported C++ ABI kind"); } } @@ -4959,4 +4957,4 @@ Declaration* Parser::GetDeclarationFromFriend(clang::NamedDecl* FriendDecl) Decl->lineNumberEnd = MinLineNumberEnd; } return Decl; -} \ No newline at end of file +}