[all-commits] [llvm/llvm-project] 5eb271: [clang][OpenMP][DebugInfo] Debug support for varia...

Alok Kumar Sharma via All-commits all-commits at lists.llvm.org
Wed Dec 22 06:35:46 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5eb271880c8fc59835797806ac44f736eaf3ddbd
      https://github.com/llvm/llvm-project/commit/5eb271880c8fc59835797806ac44f736eaf3ddbd
  Author: Alok Kumar Sharma <AlokKumar.Sharma at amd.com>
  Date:   2021-12-22 (Wed, 22 Dec 2021)

  Changed paths:
    M clang/lib/CodeGen/CGStmtOpenMP.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    A clang/test/OpenMP/debug_task_shared.c

  Log Message:
  -----------
  [clang][OpenMP][DebugInfo] Debug support for variables in shared clause of OpenMP task construct

Currently variables appearing inside shared clause of OpenMP task construct
are not visible inside lldb debugger.

After the current patch, lldb is able to show the variable

```
* thread #1, name = 'a.out', stop reason = breakpoint 1.1
    frame #0: 0x0000000000400934 a.out`.omp_task_entry. [inlined] .omp_outlined.(.global_tid.=0, .part_id.=0x000000000071f0d0, .privates.=0x000000000071f0e8, .copy_fn.=(a.out`.omp_task_privates_map. at testshared.cxx:8), .task_t.=0x000000000071f0c0, __context=0x000000000071f0f0) at testshared.cxx:10:34
   7      else {
   8    #pragma omp task shared(svar) firstprivate(n)
   9        {
-> 10         printf("Task svar = %d\n", svar);
   11         printf("Task n = %d\n", n);
   12         svar = fib(n - 1);
   13       }
(lldb) p svar
(int) $0 = 9
```

Reviewed By: djtodoro

Differential Revision: https://reviews.llvm.org/D115510




More information about the All-commits mailing list