Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenObjC / debug-info-block-type.m
blob943dfd5310b4b47e598ebab34d683aff46a9da64
1 // RUN: %clang_cc1 -emit-llvm -fblocks -debug-info-kind=limited  -triple x86_64-apple-darwin14 -x objective-c < %s -o - | FileCheck %s
2 // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "__FuncPtr"
3 // CHECK-SAME:           baseType: ![[PTR:[0-9]+]]
4 // CHECK: ![[PTR]] = !DIDerivedType(tag: DW_TAG_pointer_type,
5 // CHECK-SAME:                      baseType: ![[FNTYPE:[0-9]+]]
6 // CHECK: ![[FNTYPE]] = !DISubroutineType(types: ![[ARGS:[0-9]+]])
7 // CHECK: ![[ARGS]] = !{![[BOOL:.*]], ![[ID:.*]]}
8 #define nil ((void*) 0)
9 typedef signed char BOOL;
10 // CHECK: ![[BOOL]] = !DIDerivedType(tag: DW_TAG_typedef, name: "BOOL"
11 // CHECK-SAME:                              line: [[@LINE-2]]
12 // CHECK: ![[ID]] = !DIDerivedType(tag: DW_TAG_typedef, name: "id"
14 typedef BOOL (^SomeKindOfPredicate)(id obj);
15 int main(void)
17   SomeKindOfPredicate p = ^BOOL(id obj) { return obj != nil; };
18   // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "__FuncPtr",
19   // CHECK-SAME:           line: [[@LINE-2]]
20   // CHECK-SAME:           size: 64, offset: 128,
21   return p(nil);