llvm-capstone/clang/test/CodeGenObjCXX/debug-info-block-capture-this.mm
Duncan P. N. Exon Smith 383f8413cf DebugInfo: Adapt to loss of DITypeRef in LLVM r267296
LLVM stopped using MDString-based type references, and DIBuilder no
longer fills 'retainedTypes:' with every DICompositeType that has an
'identifier:' field.   There are just minor changes to keep the same
behaviour in CFE.

Leaving 'retainedTypes:' unfilled has a dramatic impact on the output
order of the IR though.  There are a huge number of testcase changes,
which were unfortunately not really scriptable.

llvm-svn: 267297
2016-04-23 21:08:27 +00:00

21 lines
713 B
Plaintext

// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++14 -fblocks -debug-info-kind=standalone -emit-llvm %s -o - | FileCheck %s
struct test
{
int func() { return 1; }
int (^block)() = ^{ return func(); };
};
int main(int argc, const char * argv[]) {
test t;
return t.block();
}
// CHECK: ![[TESTCT:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "test"
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "__block_literal_1",
// CHECK-SAME: elements: ![[ELEMS:.*]])
// CHECK: ![[ELEMS]] = !{{{.*}}, ![[THIS:[0-9]+]]}
// CHECK: ![[THIS]] = !DIDerivedType(tag: DW_TAG_member, name: "this",
// CHECK-SAME: baseType: ![[TESTCT]],