mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 21:46:05 +00:00

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
16 lines
381 B
C++
16 lines
381 B
C++
// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -fblocks -triple %itanium_abi_triple %s -o - | FileCheck %s
|
|
|
|
// CHECK: !DISubprogram(name: "___Z1fU13block_pointerFviE_block_invoke", linkageName: "___Z1fU13block_pointerFviE_block_invoke"
|
|
void g(void (^call)(int));
|
|
|
|
void f(void (^callback)(int)) {
|
|
g(^(int x) {
|
|
callback(x);
|
|
});
|
|
}
|
|
|
|
void h() {
|
|
f(^(int x){
|
|
});
|
|
}
|