aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
diff options
context:
space:
mode:
authorAlok Kumar Sharma <AlokKumar.Sharma@amd.com>2021-11-24 10:38:19 +0530
committerAlok Kumar Sharma <AlokKumar.Sharma@amd.com>2021-11-25 19:55:22 +0530
commit36cb7477d1d43de1d97a4c2b4ba0eb5ae29cbafd (patch)
tree200e42584665f5887d1064b2a41c10b35911ac1f /llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
parent6eca1957eeee0a0c12c4b7156f58b184630e2118 (diff)
downloadllvm-36cb7477d1d43de1d97a4c2b4ba0eb5ae29cbafd.zip
llvm-36cb7477d1d43de1d97a4c2b4ba0eb5ae29cbafd.tar.gz
llvm-36cb7477d1d43de1d97a4c2b4ba0eb5ae29cbafd.tar.bz2
[clang][OpenMP][DebugInfo] Debug support for private variables inside an OpenMP task construct
Currently variables appearing inside private/firstprivate/lastprivate clause of openmp task construct are not visible inside lldb debugger. This is because compiler does not generate debug info for it. Please consider the testcase debug_private.c attached with patch. ``` 28 #pragma omp task shared(res) private(priv1, priv2) firstprivate(fpriv) 29 { 30 priv1 = n; 31 priv2 = n + 2; 32 printf("Task n=%d,priv1=%d,priv2=%d,fpriv=%d\n",n,priv1,priv2,fpriv); 33 -> 34 res = priv1 + priv2 + fpriv + foo(n - 1); 35 } 36 #pragma omp taskwait 37 return res; (lldb) p priv1 error: <user expression 0>:1:1: use of undeclared identifier 'priv1' priv1 ^ (lldb) p priv2 error: <user expression 1>:1:1: use of undeclared identifier 'priv2' priv2 ^ (lldb) p fpriv error: <user expression 2>:1:1: use of undeclared identifier 'fpriv' fpriv ^ ``` After the current patch, lldb is able to show the variables ``` (lldb) p priv1 (int) $0 = 10 (lldb) p priv2 (int) $1 = 12 (lldb) p fpriv (int) $2 = 14 ``` Reviewed By: djtodoro Differential Revision: https://reviews.llvm.org/D114504
Diffstat (limited to 'llvm/lib/CodeGen/LocalStackSlotAllocation.cpp')
0 files changed, 0 insertions, 0 deletions