Function blocks don't have a name specified in source code. Currently their symbol name is based on the parent function's name and an index.
Ex: _ZN1Parent_Funciton_block_invoke_1
One issue that happens with the current naming scheme is that in subsequent builds, the name of the function block can change even if the function block or the parent function has changed. This presents issues for tools that use symbol names to identify changes in source code / tracking of binary metrics.
The proposed solution here is to change the incremental number to a hash of the block parameter types.
Ex: _ZN1Parent_Funciton_block_invoke_38172 (38172 is the hash of the parameters)
Therefore, the function block name will only change if its parameters or the parent function name changes. And will now remain stable regardless if new function blocks are added.
That doesn't look quite right, _ZTSi means the typeinfo symbol for int, but we really should just be printing the type, i. I think we should add a new member on MangleContext (in Mangle.h) for mangling block invocation functions, then implement it in ItaniumMangle.cpp to call CXXNameMangler::mangleType for each parameter (the MS mangling can probably just be left as-is, I don't think it matters all that much for blocks).