2 ; RUN: split-file %s %t
3 ; RUN: sed -e "s|DSTROOT|%/t|g" %t/inputs.json.in > %t/inputs.json
4 ; RUN: yaml2obj %t/AliasList.yaml -o %t/Frameworks/AliasList.framework/AliasList
6 ; RUN: clang-installapi --target=x86_64-apple-macos13 \
7 ; RUN: -alias_list %t/aliases.txt \
8 ; RUN: -install_name /System/Library/Frameworks/AliasList.framework/Versions/A/AliasList \
9 ; RUN: -current_version 1 -compatibility_version 1 \
10 ; RUN: -F%t/Frameworks -ObjC %t/inputs.json --verify-mode=Pedantic \
11 ; RUN: --verify-against=%t/Frameworks/AliasList.framework/AliasList \
12 ; RUN: -o %t/AliasList.tbd 2>&1 | FileCheck -allow-empty %s \
13 ; RUN: --implicit-check-not=error --implicit-check-not=warning
14 ; RUN: llvm-readtapi -compare %t/expected.tbd %t/AliasList.tbd
16 // Check error handling.
17 ; RUN: not clang-installapi --target=x86_64-apple-macos13 \
18 ; RUN: -alias_list %t/invalid.txt \
19 ; RUN: -install_name /System/Library/Frameworks/AliasList.framework/Versions/A/AliasList \
20 ; RUN: -current_version 1 -compatibility_version 1 \
21 ; RUN: -F%t/Frameworks -ObjC %t/inputs.json --verify-mode=Pedantic \
22 ; RUN: --verify-against=%t/Frameworks/AliasList.framework/AliasList \
23 ; RUN: -o %t/AliasList.tbd 2>&1 | FileCheck -allow-empty %s \
24 ; RUN: --check-prefix=INVALID
26 ; INVALID: error: could not read symbol alias input list {{.*}}invalid.txt': invalid input format: missing alias for: _hidden
28 ;--- Frameworks/AliasList.framework/Headers/AliasList.h
29 // simple alias from one symbol to another.
30 extern int simple_symbol;
31 extern int alias_symbol;
33 // This symbol comes from the alias file.
34 extern int exported_symbol;
36 // This symbol was moved here and has several special hide symbols in the alias
38 extern int moved_here_symbol;
40 // This alias is public, whereas the source is private.
41 extern int public_symbol;
43 ;--- Frameworks/AliasList.framework/PrivateHeaders/AliasList_Private.h
44 // This is a private symbol that has a public alias.
45 extern int private_symbol;
49 _simple_symbol _alias_symbol
50 # test multiple space characters separated symbol and alias
51 _hidden_symbol _exported_symbol # test inline comment with spaces
52 # test tab character separated symbol and alias
53 _moved_here_symbol $ld$hide$os10.4$_moved_here_symbol# test inline comment without spaces
54 # test trailing space character
55 _moved_here_symbol $ld$hide$os10.5$_moved_here_symbol
56 # test trailing tab character
57 _moved_here_symbol $ld$hide$os10.6$_moved_here_symbol
58 _private_symbol _public_symbol
62 _simple_symbol _alias_symbol
72 "_exported_symbol", "_simple_symbol", "_moved_here_symbol",
73 "$ld$hide$os10.6$_moved_here_symbol", "$ld$hide$os10.4$_moved_here_symbol",
74 "$ld$hide$os10.5$_moved_here_symbol", "_public_symbol",
75 "_private_symbol", "_alias_symbol"
83 "not_app_extension_safe"
89 "name": "/System/Library/Frameworks/AliasList.framework/Versions/A/AliasList"
94 "min_deployment": "13",
95 "target": "x86_64-macos"
141 segname: __DATA_CONST
151 - sectname: __objc_imageinfo
152 segname: __DATA_CONST
163 content: '0000000040000000'
199 - cmd: LC_DYLD_INFO_ONLY
242 current_version: 65536
243 compatibility_version: 65536
244 Content: '/System/Library/Frameworks/AliasList.framework/Versions/A/AliasList'
248 uuid: 4C4C4468-5555-3144-A123-B0FDB87F9813
249 - cmd: LC_BUILD_VERSION
263 current_version: 88539136
264 compatibility_version: 65536
265 Content: '/usr/lib/libSystem.B.dylib'
267 - cmd: LC_FUNCTION_STARTS
271 - cmd: LC_DATA_IN_CODE
287 Name: '$ld$hide$os10.'
295 Name: '4$_moved_here_symbol'
302 Name: '6$_moved_here_symbol'
309 Name: '5$_moved_here_symbol'
360 Name: moved_here_symbol
367 Name: exported_symbol
430 - '$ld$hide$os10.4$_moved_here_symbol'
431 - '$ld$hide$os10.5$_moved_here_symbol'
432 - '$ld$hide$os10.6$_moved_here_symbol'
452 "path" : "DSTROOT/Frameworks/AliasList.framework/Headers/AliasList.h",
456 "path" : "DSTROOT/Frameworks/AliasList.framework/PrivateHeaders/AliasList_Private.h",