<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/105828>105828</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [Clang] OpenMP debug info is not generated in declare mapper
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          mikaoP
      </td>
    </tr>
</table>

<pre>
    ```cpp
typedef struct {
  int a;
} C;
#pragma omp declare mapper(C s) map(to : s.a)

typedef struct {
  C f;
} D;

int main() {
  D sa[10];
#pragma omp target map(tofrom : sa[0 : 2])
  {

 }
}
```
This simple test is based on `declare_mapper_nested_default_mappers_1.cpp`
Command: `clang -fopenmp t1.cpp -fopenmp-targets=x86_64-unknown-linux-gnu -g`
```
inlinable function call in a function with debug info must have a !dbg location
 call void @.omp_mapper._ZTS1C.default(ptr %7, ptr %omp.arraymap.ptrcurrent, ptr %f, i64 4, i64 %omp.maptype, ptr @1) #3
```
Without `-g` it works as is the way offload tests are run
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVM2OpEYMfpriYjWCKuimDxxmGs0tykpZKVIuLQMGKlN_qipmdt4-Kprpno0SrYTAtvzZn__AEORsiFpWP7O6y3CNi_Wtlq9ov2W9HT9adixuz-AcKzpWPMUPRyNNEKJfhwjs9HyzA0gTAZnYdXbq4PLQuHAeZ41gtYORBoWeQKNz5BlvLhAYPyed8SZaYOIJQo6Mn3f4L1JfYPopcffQtneiplEaxpuU5wuyg4Csfi4LVnf_wzainyneyU3e6hvBBCw2kSf0J1l4xN8N7NTdue3CZ19v6vdFBghSO0UQKUSQAXoMNII1wI7F3rDrrWFXQyHSeB1pwlXF3RquZZ6m9BnzYrVGMyZ6aX4KzQyHyToyqabN964fbjUGJrofzfF6rA6reTX23RyUNOuPw2xWOMz30P9iL42SBntFMK1miNIaGFApkAbwYXqXcYGR-nUGaSYLeg0RFnwjQGC8HPsZlB0w-e5t24K8WTkCq4rcardXml__-v5Hecn3-hlvXPTAeH1i_AK7bLXL0Xv80OhyF_2wek8mfvGYkiyPFVSfwg7T6NKq3V2roty2hgvxn_X_KeNi15javDUJZIR3618DYEiTjAvBO36AnSZlcdwmHCAdgF9NNrZiPIszZtSWJ15V5blpeLa0SENRcIHDQLWo6TQ0ZT-KsSlF3-B5OGey5QWvioaLUoiS85xOnIvjUYj-XFd8IlYVpFGqXKk3nVs_ZzKEldqyqBveZAp7UmE7fs63_WA8LXLm2wQ49OscWFUoGWJ4hIgyqu2PcdkQdQe_OzK_ffs6WhnA2AgzGfIYaUyb8PPNZ6tX7RKjC0w8Mf7C-Mss47L2-WA14y8p3f45OG__piEy_rLRD4y_7BW8tfyfAAAA__--qG_J">