[DebugInfo] Fix debug-info generation for block invocations so that we set the Linkag...
authorshafik <syaghmour@apple.com>
Wed, 5 Feb 2020 18:39:35 +0000 (10:39 -0800)
committershafik <syaghmour@apple.com>
Wed, 5 Feb 2020 19:07:30 +0000 (11:07 -0800)
commit428583dd22fdc8f789390822e7b8ef4a5534721d
treedf4b14739f28da322e029d99bdf110b97629497a
parent3524755a1a25c18ecf47e50e5186232da0751cfe
[DebugInfo] Fix debug-info generation for block invocations so that we set the LinkageName

Currently when generating debug-info for a BlockDecl we are setting the Name to the mangled name and not setting the LinkageName.
This means we see the mangled name for block invcations ends up in DW_AT_Name and not in DW_AT_linkage_name.

This patch fixes this case so that we also set the LinkageName as well.

Differential Revision: https://reviews.llvm.org/D73282
clang/lib/CodeGen/CGDebugInfo.cpp
clang/test/CodeGenCXX/debug-info-block-invocation-linkage-name.cpp [new file with mode: 0644]