clang has an extension for block invocations whose mangled name starts with ___Z. Currently when generating debug-info for block invocations we are setting the Name to the mangled name as opposed to the LinkageName. This means we see the mangled name for block invcations ends up in DW_AT_Name as opposed to DW_AT_linkage_name.
This patch fixes this case so the LinkageName for block invocations is set to the mangled name.
Could you please add a comment that Clang Blocks are generated as raw llvm::Functions but do have a mangled name and that is handling this case? Otherwise this would look suspicious.