<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54500>54500</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
lld-link throws warnings about PDB indexes when using with latest Visual Studio 2022 (17.1.0)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
lld,
lld:COFF,
platform:windows
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tru
</td>
</tr>
</table>
<pre>
This is split out from #54487 since they seem to be fairly unrelated at this point.
With lld-link and the latest visual studio and a command like this:
```
lld-link.exe "main.obj" /NOLOGO /DEBUG /SUBSYSTEM:CONSOLE /MACHINE:X64 /LIBPATH:"%VS2022_DIR%\VC\Tools\MSVC\14.31.31103\lib\x64" /LIBPATH:"%WINSDK_DIR%\ucrt\x64" /LIBPATH:"%WINSDK_DIR%\um\x64"
```
You get warnings like this:
```
lld-link: warning: procedure symbol record for `_FilterSetCurrentException` in d:\a01\_work\43\s\Intermediate\vctools\libvcruntime.nativeproj_520857879\objr\amd64\ehhelpers.obj refers to PDB item index 0x1191 which is not a valid function ID record
```
This warning comes from this source line: https://github.com/llvm/llvm-project/blob/main/lld/COFF/PDB.cpp#L385
I dumped the info from the [PDB](https://gist.github.com/tru/721bdb645518df2bdcd8d5f9391c60f8) and the [OBJ](https://gist.github.com/tru/dad22d679bec9cf1ed98e29c8c7e2d48) in gists.
I am trying to follow along in the code there - but unsure how the functtype is used and where it's looked up. Any pointers would be nice.
cc @aganea @sylvain-audi @rnk
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVVNtu2zgQ_Rr5hYigqy09-CG2k9a7SVys03T7FFDkyGJDkQIvvvz9DmUn3RRFgQAExSE5o5nDM6fR_DR_7IQlOOwghSPaO9Ia3ZMoy8uiqGbECsWAuA5OxAL0xGnSAGmpMPJEvDIgqQNOqMM7GGbQQrk4SlZRcn2evwnXESn5lRTqhVDFQzASvKwje2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