xref: /aosp_15_r20/external/clang/test/CodeGen/preserve-call-conv.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm < %s | FileCheck %s
2*67e74705SXin Li // RUN: %clang_cc1 -triple arm64-unknown-unknown -emit-llvm < %s | FileCheck %s
3*67e74705SXin Li 
4*67e74705SXin Li // Check that the preserve_most calling convention attribute at the source level
5*67e74705SXin Li // is lowered to the corresponding calling convention attrribute at the LLVM IR
6*67e74705SXin Li // level.
foo()7*67e74705SXin Li void foo() __attribute__((preserve_most)) {
8*67e74705SXin Li   // CHECK-LABEL: define preserve_mostcc void @foo()
9*67e74705SXin Li }
10*67e74705SXin Li 
11*67e74705SXin Li // Check that the preserve_most calling convention attribute at the source level
12*67e74705SXin Li // is lowered to the corresponding calling convention attrribute at the LLVM IR
13*67e74705SXin Li // level.
boo()14*67e74705SXin Li void boo() __attribute__((preserve_all)) {
15*67e74705SXin Li   // CHECK-LABEL: define preserve_allcc void @boo()
16*67e74705SXin Li }
17*67e74705SXin Li 
18