When emitting CodeView debug information, C++ lambda types need a unique identifier so Visual Studio can match the forward reference for the type to the definition. Currently they are all named "<unnamed-tag>". This patch, also necessary for D32498, will enable debugging of captured variables within lambdas using Visual Studio.
Previous LF_CLASS type record for a lambda looks like this:
Class (0x100A) { TypeLeafKind: LF_CLASS (0x1504) ... Name: main::<unnamed-tag> }
After this change the type record looks like this:
Class (0x100A) { TypeLeafKind: LF_CLASS (0x1504) ... Name: main::<unnamed-tag> LinkageName: .?AV<lambda_0>@?0??main@@9@ }
Manufacturing a better "name" for the lambda object is not necessary to allow proper debugging of captured variables.
The indentation seems off which suggests the patch may contain tabs. Please check that there are none before submitting.