<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/153277>153277</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[CIR] Upstream inline attribute handling
</td>
</tr>
<tr>
<th>Labels</th>
<td>
ClangIR
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
andykaylor
</td>
</tr>
</table>
<pre>
### Overview
Upstream support for attaching the `noinline`, `alwaysinline`, and `inlinehint` attributes for function definitions in ClangIR.
The clang AST contains the information needed to determine when these attributes should be attached. The CIR generation code just needs to add handling to check for the presence of these attributes in the AST and to attach them to the generated function definitions.
### Suggested minimal test case
```
inline void f1() {}
__attribute__((noinline))
void f2() {}
__attribute__((always_inline))
void f3() {}
}```
### Existing incubator tests
clang/test/CIR/CodeGen/function-attrs.cpp
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMU8Fu2zAM_Rr5QjRQ5MR2Dj64yTL0NKDtzoFs0bZaWTJEOV3-fpDjpS3awwAhsSjy8fGRlES6s4gl296z7SGRU-idL6VVl1d5Mc4ntVOXkon0euDXGf1Z4xvj1e-Rgkc5AE3j6HyA1nmQIcim17aD0COwjFunrdEWWcaZ2EeLNG_yQp-s0qr4crX12gaW8QjldT0FpBm5nWwTtLOgsNVWx08CbWFvpO0eHleMV4xXzz1CEy1QPT1D42yQ2tJMRtvW-UHOGBZRoYLgQGFAP2iL8NajjY6EH1NT7yajoMalNFQriEn2D4_QoUV_BWycQniZKMzQFJGlUtBLq8yshoOmx-Z1LiWyGT0S2gbBtV-T6pnIXEKUJoLNyaN1iNf4umRH9a00ix7vnXuaug4pug_a6kEaCEgBGkkY_TK-HF5d2wBnpxW0ayYKJnbA8nuWH66gp9ON6-k0vxe3NotdPLy6Rov_i76OxOlbiPQLRH74yPZTkT_-aApRb22bqZYhio0UiPFqngomjvHOxHH_8Bh_ncKfaJk4_tPwLpKjVTOOiSpTtUt3MsFynW-3POUbkSd9yVXOd5tWct5iIVpZbIpss94pLtqi3mGb6FJwseXFWggucp6vsgJlmmV1y3OZFkqyDcdBarMy5jysnO8STTRhud6mIs8TI2s0NO-kEMt8MyHigvoyhtzVU0dsw42mQO8gQQczr3IsbnuA24YuHb3pfpvLZPKm7EMYiaUVE0cmjp0O_VSvGjcwcYzQy9_d6N0LNlG7mSwxcVz4nkvxNwAA__9HLmS2">