blob: 7a7b6f6e087bbc935957318f1f8ade4d00e73767 (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin -fobjc-fragile-abi -emit-llvm %s -o %t-64.ll
// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.ll %s
// rdar: // 8390455
@class NSArray;
static NSArray *(^ArrayRecurs)(NSArray *addresses, unsigned long level) = ^(NSArray *addresses, unsigned long level) {
for(id rawAddress in addresses)
{
NSArray *separatedAddresses = ((NSArray*)0);
separatedAddresses = ArrayRecurs((NSArray *)rawAddress, level+1);
}
return (NSArray *)0;
};
void FUNC()
{
static NSArray *(^ArrayRecurs)(NSArray *addresses, unsigned long level) = ^(NSArray *addresses, unsigned long level) {
for(id rawAddress in addresses)
{
NSArray *separatedAddresses = ((NSArray*)0);
separatedAddresses = ArrayRecurs((NSArray *)rawAddress, level+1);
}
return (NSArray *)0;
};
if (ArrayRecurs) {
static NSArray *(^ArrayRecurs)(NSArray *addresses, unsigned long level) = ^(NSArray *addresses, unsigned long level) {
for(id rawAddress in addresses)
{
NSArray *separatedAddresses = ((NSArray*)0);
separatedAddresses = ArrayRecurs((NSArray *)rawAddress, level+1);
}
return (NSArray *)0;
};
}
}
void FUNC1()
{
static NSArray *(^ArrayRecurs)(NSArray *addresses, unsigned long level) = ^(NSArray *addresses, unsigned long level) {
for(id rawAddress in addresses)
{
NSArray *separatedAddresses = ((NSArray*)0);
separatedAddresses = ArrayRecurs((NSArray *)rawAddress, level+1);
}
return (NSArray *)0;
};
}
// CHECK-LP64: @ArrayRecurs = internal global
// CHECK-LP64: @FUNC.ArrayRecurs = internal global
// CHECK-LP64: @FUNC.ArrayRecurs3 = internal global
// CHECK-LP64: @FUNC1.ArrayRecurs = internal global
|