xref: /aosp_15_r20/external/clang/test/CodeGenCXX/debug-info-byval.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // FIXME: Check IR rather than asm, then triple is not needed.
2*67e74705SXin Li // RUN: %clang -Xclang -triple=%itanium_abi_triple -g -S %s -o - | FileCheck %s
3*67e74705SXin Li // Test to check presence of debug info for byval parameter.
4*67e74705SXin Li // Radar 8350436.
5*67e74705SXin Li class DAG {
6*67e74705SXin Li public:
7*67e74705SXin Li   int i;
8*67e74705SXin Li   int j;
9*67e74705SXin Li };
10*67e74705SXin Li 
11*67e74705SXin Li class EVT {
12*67e74705SXin Li public:
13*67e74705SXin Li   int a;
14*67e74705SXin Li   int b;
15*67e74705SXin Li   int c;
16*67e74705SXin Li };
17*67e74705SXin Li 
18*67e74705SXin Li class VAL {
19*67e74705SXin Li public:
20*67e74705SXin Li   int x;
21*67e74705SXin Li   int y;
22*67e74705SXin Li };
23*67e74705SXin Li void foo(EVT e);
24*67e74705SXin Li EVT bar();
25*67e74705SXin Li 
get(int * i,unsigned dl,VAL v,VAL * p,unsigned n,EVT missing_arg)26*67e74705SXin Li void get(int *i, unsigned dl, VAL v, VAL *p, unsigned n, EVT missing_arg) {
27*67e74705SXin Li //CHECK: .{{asciz|string}} "missing_arg"
28*67e74705SXin Li   EVT e = bar();
29*67e74705SXin Li   if (dl == n)
30*67e74705SXin Li     foo(missing_arg);
31*67e74705SXin Li }
32*67e74705SXin Li 
33