xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/debug-info-byval.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang -g -S %s -o - | FileCheck %s
2*f4a2713aSLionel Sambuc // Test to check presence of debug info for byval parameter.
3*f4a2713aSLionel Sambuc // Radar 8350436.
4*f4a2713aSLionel Sambuc class DAG {
5*f4a2713aSLionel Sambuc public:
6*f4a2713aSLionel Sambuc   int i;
7*f4a2713aSLionel Sambuc   int j;
8*f4a2713aSLionel Sambuc };
9*f4a2713aSLionel Sambuc 
10*f4a2713aSLionel Sambuc class EVT {
11*f4a2713aSLionel Sambuc public:
12*f4a2713aSLionel Sambuc   int a;
13*f4a2713aSLionel Sambuc   int b;
14*f4a2713aSLionel Sambuc   int c;
15*f4a2713aSLionel Sambuc };
16*f4a2713aSLionel Sambuc 
17*f4a2713aSLionel Sambuc class VAL {
18*f4a2713aSLionel Sambuc public:
19*f4a2713aSLionel Sambuc   int x;
20*f4a2713aSLionel Sambuc   int y;
21*f4a2713aSLionel Sambuc };
22*f4a2713aSLionel Sambuc void foo(EVT e);
23*f4a2713aSLionel Sambuc EVT bar();
24*f4a2713aSLionel Sambuc 
25*f4a2713aSLionel Sambuc void get(int *i, unsigned dl, VAL v, VAL *p, unsigned n, EVT missing_arg) {
26*f4a2713aSLionel Sambuc //CHECK: .{{asciz|string}} "missing_arg"
27*f4a2713aSLionel Sambuc   EVT e = bar();
28*f4a2713aSLionel Sambuc   if (dl == n)
29*f4a2713aSLionel Sambuc     foo(missing_arg);
30*f4a2713aSLionel Sambuc }
31*f4a2713aSLionel Sambuc 
32