Skip to content

Commit

Permalink
ABI handling fixes in Parser.cpp (mono#1829)
Browse files Browse the repository at this point in the history
* ABI handling fixes in Parser.cpp

* Update Parser.cpp
  • Loading branch information
tritao authored Feb 8, 2024
1 parent 8bd3f45 commit 099fadb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/CppParser/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -731,16 +731,14 @@ void Parser::WalkVTable(const clang::CXXRecordDecl* RD, Class* C)
}
break;
}
case TargetCXXABI::GenericItanium:
default:
{
ItaniumVTableContext VTContext(AST);

auto& VTLayout = VTContext.getVTableLayout(RD);
C->layout->layout = WalkVTableLayout(VTLayout);
break;
}
default:
llvm_unreachable("Unsupported C++ ABI kind");
}
}

Expand Down Expand Up @@ -4959,4 +4957,4 @@ Declaration* Parser::GetDeclarationFromFriend(clang::NamedDecl* FriendDecl)
Decl->lineNumberEnd = MinLineNumberEnd;
}
return Decl;
}
}

0 comments on commit 099fadb

Please sign in to comment.