]> git.saurik.com Git - apple/ld64.git/blob - ld64-134.9/unit-tests/test-cases/lto-dead_strip-coalesce/main.c
08e2cd2c1a7f677eed3feb540167631f02844b1f
[apple/ld64.git] / ld64-134.9 / unit-tests / test-cases / lto-dead_strip-coalesce / main.c
1
2 #include <string.h>
3 #include <CoreFoundation/CoreFoundation.h>
4
5
6 extern void foo1();
7 extern void foo2();
8
9
10 void t1()
11 {
12 CFStringGetLength(CFSTR("test1"));
13 strlen("str1");
14 }
15
16 void t2()
17 {
18 CFStringGetLength(CFSTR("test2"));
19 strlen("str2");
20 }
21
22 void t3()
23 {
24 CFStringGetLength(CFSTR("test3"));
25 strlen("str3");
26 }
27
28 // <rdar://problem/12005173> error with LTO and dead strip of non-lazy-pointer
29 void* foo2p() {
30 return &foo2;
31 }
32
33 int main()
34 {
35 t2();
36 foo1();
37 return 0;
38 }
39