Skip to content

Commit

Permalink
Fix the C data model for AppleAarch64 to be LP64. (#107)
Browse files Browse the repository at this point in the history
Fixes #100.
  • Loading branch information
sunfishcode authored Jul 1, 2024
1 parent 5614a86 commit 669004f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/triple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ impl Triple {
Ok(CDataModel::LLP64)
} else if self.default_calling_convention() == Ok(CallingConvention::SystemV)
|| self.architecture == Architecture::Wasm64
|| self.default_calling_convention() == Ok(CallingConvention::AppleAarch64)
{
Ok(CDataModel::LP64)
} else {
Expand Down Expand Up @@ -480,13 +481,12 @@ mod tests {
"aarch64-apple-tvos",
"aarch64-apple-watchos",
] {
let triple = Triple::from_str(triple).unwrap();
assert_eq!(
Triple::from_str(triple)
.unwrap()
.default_calling_convention()
.unwrap(),
triple.default_calling_convention().unwrap(),
CallingConvention::AppleAarch64
);
assert_eq!(triple.data_model().unwrap(), CDataModel::LP64);
}

for triple in &["aarch64-linux-android", "x86_64-apple-ios"] {
Expand Down

0 comments on commit 669004f

Please sign in to comment.