<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/74470>74470</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Improve the lambda name in debug information
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tru
</td>
</tr>
</table>
<pre>
Internally the question came up why the lambda names where mangled names instead of a "pretty" name when debugging lambdas, here is the message I got:
```
Can we get a feature in LLVM to improve the naming of lambda symbol names?
Because _lambda12345 isn't very helpful in crash dumps (when there is a crash within a lamda)
Something like _(__FILE__)_(__FUNCTION__)_(__LINE__)_(counter if there's name collisions) would be more useful
```
I asked @AaronBallman on discord and he said:
```
Hmmm when we print the "name", we usually use something like '(lambda at line:2:5)' but I there are contexts where we'd use the mangled name; I wonder if debugging is one such context (and perhaps that could be changed)?
```
and pointed to this code: https://github.com/llvm/llvm-project/blob/cd865e36dbc0b1778739348ac9a25eb18b5c5c16/clang/lib/CodeGen/CGDebugInfo.cpp#L353
He suggested I file this issue to have a discussion if this can be improved.
Cc @echristo @dwblaikie
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVFuPszYT_jXOzeiLwISQXHCxhy_vi7TdXvRwG43tAdw1NvVh0_z7ypBoU-lVpUoRAWw_M8-BwRD0YIlaVj-z-nWDKY7Ot9GnjXDq2nY2krdozBXiSPBnohC1syBxIkgzXMZ1weAkFILFiQJcRvIEE9rBkLq90zZEQgWuBwTG-ewpxivjfFnPRywoEmkYtB1ucIHxF1iwdFiqTBQCDgQdDC6y6okVr6y4X_fF7bc8vqCFC8FAERB6wpgyjIW3t99_guhAT7N3n7TAWpxyUdffaYTrJJxZO2fVaUV8JokpEJzXTSWvdjXoYBlvInySv8JIZu6TyWWkxzCCStMcABg_LPzinQve1i86jtoC5roKGT-ulX5xE-WFAYz-IDgzfjifT93b_89nxo-3x9_eX37tfn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