llvm-project/clang/test/CodeGenCXX/m68k-rtdcall.cpp
Min-Yih Hsu fd4f96290a [Clang][M68k] Add Clang support for the new M68k_RTD CC
This patch adds `CC_M68kRTD`, which will be used on function if either
`__attribute__((m68k_rtd))` is presented or `-mrtd` flag is given.

Differential Revision: https://reviews.llvm.org/D149867
2023-10-15 16:13:43 -07:00

17 lines
361 B
C++

// RUN: %clang_cc1 -triple m68k-linux-gnu -emit-llvm -o - %s | FileCheck %s
class A {
public:
// CHECK: define{{.*}} m68k_rtdcc void @_ZN1A6memberEv
void __attribute__((m68k_rtd)) member() {}
};
void test() {
A a;
a.member();
// CHECK: define{{.*}} m68k_rtdcc void @"_ZZ4testvENK3$_0clEi"
auto f = [](int b) __attribute__((m68k_rtd)) {};
f(87);
};