llvm-project/clang/test/CodeGenCXX/arm64-darwinpcs.cpp
hstk30-hw 21c1b7845b
fix: C++ empty record with align lead to va_list out of sync (#72197)
Fix AArch64 argument passing for C++ empty classes with large explicitly specified  alignment

reproducer: https://godbolt.org/z/qsze8fqra 
rel issue: https://github.com/llvm/llvm-project/issues/69872 
rel commit: 1711cc930b
2025-11-08 21:52:13 +08:00

16 lines
682 B
C++

// RUN: %clang_cc1 -triple arm64-linux-gnu -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -triple arm64-linux-gnu -emit-llvm -o - %s -target-abi darwinpcs | FileCheck %s --check-prefix=CHECK-DARWIN
void test_extensions(bool a, char b, short c) {}
// CHECK: define{{.*}} void @_Z15test_extensionsbcs(i1 noundef %a, i8 noundef %b, i16 noundef %c)
// CHECK-DARWIN: define{{.*}} void @_Z15test_extensionsbcs(i1 noundef zeroext %a, i8 noundef signext %b, i16 noundef signext %c)
struct Empty {};
void test_empty(Empty e) {}
// CHECK: define{{.*}} void @_Z10test_empty5Empty(i64 %e.coerce)
// CHECK-DARWIN: define{{.*}} void @_Z10test_empty5Empty()
struct HFA {
float a[3];
};