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