<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/119593>119593</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
The func arg attributes are not retained for functions without a body
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
LLITCHEV
</td>
</tr>
</table>
<pre>
It looks like the attributes for func arguments (particularly loc attribute - NamedLocation) are retained as block attributes on the first region's first block.
These are dropped if the function has no body.
For example, the following function "loses" the func arg attributes.
module @pkg {
func.func private @foo(%a: i32 loc("e"), %b: i32 loc("f")) ->
i32 attributes { verilog_return_mappings = "return" }
}
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxsUsFu4zoM_Br6QiSwKbuODj6kTYNXoHinYq-FbNO2NrJlSHK6_fuF1HZTYPckgJzhcMRR3utxYW6guofqlKktTNY1z89PLw__Pf7IWtu_N08BjbUXj0ZfGMPEqEJwut0Cexysw2FbOlRu3GZegkegw6pc0N1mlDPvaGx3Y-AO_1cz98-2U0HbBUiicoyOg9IL96g8tsZ2l-8idkmyg3Y-oOMx8Wr_WUjwPeTHl4k9p2m9s-vKPerhg7gtXRTDSXlcLEZbkXC2DvmXmlfDQA8fUGuMfdPLeCMBkbGePRD9mRbtftswDpttvxlGKPP1MiLU95AfMYH3ibE6fVUhAQZrgQ5AlQJxRC0o_lGqEAMRkIzrAFXtX_3hqy9xB-IxaUTAt9-C-h6v7LSx46vjsLnldVbrqpfRI4hT9PNRjoagPkF-hPqU9Y3opZAq46aohZCiLmWeTU15VxaHO1nlshdKtnmfD5WUObeHkkQvq0w3lFNZUFEUdXHI631ftX15d1Cqk7IV-QHKnGelzd6Y67y3bsy09xs3RSErKTKjWjY-RZBo4TdM3eizOmWuiaRdu40eytxoH_xtTNDBcPPy75ukICw23KL1ldV4VY9vOkx2C6hSHLLNmWYKYfUgjkBnoPOow7S1-87OQOeo-fnsVmd_cheAzmlTD3T-tHJt6HcAAAD__5WlFG0">