2 //// We don't yet support DW_OP_implicit_pointer in llvm.
5 // UNSUPPORTED: system-windows
6 // RUN: %dexter --fail-lt 1.0 -w --debugger lldb \
7 // RUN: --builder 'clang-c' --cflags "-O3 -glldb" -- %s
9 //// Check that 'param' in 'fun' can be read throughout, and that 'pa' and 'pb'
10 //// can be dereferenced in the debugger even if we can't provide the pointer
16 //// A no-inline, read-only function with internal linkage is a good candidate
17 //// for arg promotion.
18 __attribute__((__noinline__
))
19 static void use_promote(const int* pa
) {
20 //// Promoted args would be a good candidate for an DW_OP_implicit_pointer.
21 globa
= *pa
; // DexLabel('s2')
24 __attribute__((__always_inline__
))
25 static void use_inline(const int* pb
) {
26 //// Inlined pointer to callee local would be a good candidate for an
27 //// DW_OP_implicit_pointer.
28 globb
= *pb
; // DexLabel('s3')
31 __attribute__((__noinline__
))
33 volatile int step
= 0; // DexLabel('s1')
36 return step
; // DexLabel('s4')
43 // DexExpectWatchValue('param', 5, from_line=ref('s1'), to_line=ref('s4'))
44 // DexExpectWatchValue('*pa', 5, on_line=ref('s2'))
45 // DexExpectWatchValue('*pb', 5, on_line=ref('s3'))