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

[CIR][ABI][NFC] AppleARM64 CXXABI handling in TargetLowering library #733

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions clang/include/clang/CIR/MissingFeatures.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ struct MissingFeatures {
// We're ignoring several details regarding ABI-halding for Swift.
static bool swift() { return false; }

// The AppleARM64 is using ItaniumCXXABI, which is not quite right.
static bool appleArm64CXXABI() { return false; }

// Despite carrying some information about variadics, we are currently
// ignoring this to focus only on the code necessary to lower non-variadics.
static bool variadicFunctions() { return false; }
Expand Down
1 change: 1 addition & 0 deletions clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ CIRGenCXXABI *cir::CreateCIRGenItaniumCXXABI(CIRGenModule &CGM) {
case TargetCXXABI::AppleARM64:
// TODO: this isn't quite right, clang uses AppleARM64CXXABI which inherits
// from ARMCXXABI. We'll have to follow suit.
assert(!MissingFeatures::appleArm64CXXABI());
return new CIRGenItaniumCXXABI(CGM);

default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ CIRCXXABI *CreateItaniumCXXABI(LowerModule &LM) {
// include the other 32-bit ARM oddities: constructor/destructor return values
// and array cookies.
case clang::TargetCXXABI::GenericAArch64:
case clang::TargetCXXABI::AppleARM64:
// TODO: this isn't quite right, clang uses AppleARM64CXXABI which inherits
// from ARMCXXABI. We'll have to follow suit.
assert(!::cir::MissingFeatures::appleArm64CXXABI());
return new ItaniumCXXABI(LM, /*UseARMMethodPtrABI=*/true,
/*UseARMGuardVarABI=*/true);

Expand Down
Loading