mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 19:06:05 +00:00

copy/dispose helper functions We found out that these fake functions would cause clang to crash if the changes proposed in https://reviews.llvm.org/D98799 were made. The original patch was reverted in f681fd927e883301658dcac9a78109ee0aba12a8 because debug locations were missing in the body of the block byref helper functions. This patch fixes the bug by calling CreateArtificial after the calls to StartFunction. Differential Revision: https://reviews.llvm.org/D104082
19 lines
565 B
C++
19 lines
565 B
C++
// RUN: %clang_cc1 %s -debug-info-kind=line-tables-only -fblocks -S -emit-llvm -o - | FileCheck %s
|
|
// RUN: %clang_cc1 %s -debug-info-kind=line-directives-only -fblocks -S -emit-llvm -o - | FileCheck %s
|
|
|
|
struct A {
|
|
A();
|
|
A(const A &);
|
|
~A();
|
|
};
|
|
|
|
void test() {
|
|
__block A a;
|
|
^{ (void)a; };
|
|
}
|
|
|
|
// CHECK: !DISubprogram(linkageName: "__Block_byref_object_copy_",
|
|
// CHECK-SAME: DISPFlagLocalToUnit | DISPFlagDefinition
|
|
// CHECK: !DISubprogram(linkageName: "__Block_byref_object_dispose_",
|
|
// CHECK-SAME: DISPFlagLocalToUnit | DISPFlagDefinition
|