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

    <tr>
        <th>Summary</th>
        <td>
            [OpenMP] Auto declare target does not work for inline functions
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    If an inline function is used in a target region we do not automatically compile it for the device (mark it as declare target):

https://godbolt.org/z/E4Y5dzsx5
```
inline void foo() {}

void test( ){
    #pragma omp target
 foo();
}
```
results in:
```
; Function Attrs: convergent
declare void @foo()
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxckkFvnDAQhX_NcBll5R0DCwcOWW2Reqjaa48GD6wTYyPbbJr8-gpCuk0kBILnefNm-FSMZnTMDRRnKC6ZWtLVh-ZJew4Dh5R1Xr823wdUDo2zxjEOi-uT8Q5NxCWyRuNQYVJh5ISBx1V6YdQenU-oluQnlUyvrH3F3k-zsYwm4eADpiuj5pvpGYGqSYXnVVERNfdWBd5dgWqQjyAuIPb7NaU5rt-oBWpHrztv08GHEah9A2q_5b8L_Rb_FHtRKfZre90HuXmjcfAeqAKqEU5nOF3-77IdSBwTUIVriNP5XUBEBJJzUOOk0E_zR9B39Z8nyL3gbvw5SeC42BTRuPuAn0-APGP7sfHHlMI6Nvbe3TiM7PaWH_vaEkMu7gk-e2a6kbqWtcq4OZa1KI55Vcjs2vRCD9z1RxIk6krkNQ1asJa61MdB1pSZhgRJcaJKSDpJeagqUZdcqEqUQteiglzwpIw9WHub1l-RmRgXbsr8WBWZVR3buFFG5PgFNxGIVuhCs9Y8dMsYIRfWxBTvLskku-H5c2b34xcUF3xckv-CCGrPcQPuxYfnDa4vuMZsCbb5Ao5J16U79H4CateO--NhDv6J-wTUbjkjULvN8TcAAP__MaP4Qg">