| // This ensures that DW_OP_deref is inserted when necessary, such as when NRVO |
| // of a string object occurs in C++. |
| // RUN: %clangxx -O0 -fno-exceptions %target_itanium_abi_host_triple %s -o %t.out -g |
| // RUN: %test_debuginfo %s %t.out |
| // RUN: %clangxx -O1 -fno-exceptions %target_itanium_abi_host_triple %s -o %t.out -g |
| // RUN: %test_debuginfo %s %t.out |
| volatile int sideeffect = 0; |
| void __attribute__((noinline)) stop() { sideeffect++; } |
| string __attribute__((noinline)) get_string() { |
| void some_function(int) {} |
| string2(string2 &&other) { i = other.i; } |
| string2 __attribute__((noinline)) get_string2() { |
| // Test that the debugger can get the value of result after another |
| // DEBUGGER: print result.i |
| // DEBUGGER: print result.i |