forked from llvm/llvm-project
- Notifications
You must be signed in to change notification settings - Fork 339
/
Copy pathdbg-arg.c
46 lines (41 loc) · 799 Bytes
/
dbg-arg.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// This test case checks debug info during register moves for an argument.
// RUN: %clang %target_itanium_abi_host_triple -m64 -mllvm -fast-isel=false %s -c -o %t.o -g
// RUN: %clang %target_itanium_abi_host_triple -m64 %t.o -o %t.out
// RUN: %test_debuginfo %s %t.out
//
// DEBUGGER: break 26
// DEBUGGER: r
// DEBUGGER: print mutex
// CHECK: ={{.* 0x[0-9A-Fa-f]+}}
//
// Radar 8412415
struct_mtx
{
long unsigned intptr;
intwaiters;
struct {
inttag;
intpad;
} mtxi;
};
intfoobar(struct_mtx*mutex) {
intr=1;
intl=0;
intj=0;
do {
if (mutex->waiters) {
r=2;
}
j=bar(r, l);
++l;
} while (l<j);
returnr+j;
}
intbar(inti, intj) {
returni+j;
}
intmain() {
struct_mtxm;
m.waiters=0;
returnfoobar(&m);
}