[Support] Check zstd decompress result before msan unpoison (#117276)
[llvm-project.git] / clang / test / InstallAPI / asm.test
blob9df644a8239092772c18b601d5f4eb780051b76e
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
3 // RUN: sed -e "s|DSTROOT|%/t|g" %t/inputs.json.in > %t/inputs.json
5 // RUN: clang-installapi -target arm64-apple-macos13.1 \
6 // RUN: -I%t/usr/include -dynamiclib \
7 // RUN: -install_name @rpath/lib/libasm.dylib \
8 // RUN: %t/inputs.json -o %t/output.tbd 2>&1 | FileCheck %s --allow-empty
9 // RUN: llvm-readtapi -compare %t/output.tbd %t/expected.tbd 2>&1 | FileCheck %s --allow-empty
11 // CHECK-NOT: error: 
12 // CHECK-NOT: warning: 
14 //--- usr/include/asm.h
15 #ifndef ASM_H
16 #define ASM_H
18 extern int ivar __asm("_OBJC_IVAR_$_SomeClass._ivar1");
19 extern int objcClass1 __asm("_OBJC_CLASS_$_SomeClass");
20 extern int objcClass2 __asm("_OBJC_METACLASS_$_SomeClass");
21 extern int objcClass3 __asm("_OBJC_EHTYPE_$_SomeClass");
22 extern int objcClass4 __asm(".objc_class_name_SomeClass");
24 __attribute__((visibility("hidden")))
25 @interface NSString {
27 @end
29 extern int ivarExtra __asm("_OBJC_IVAR_$_NSString._ivar1");
30 #endif // ASM_H
32 //--- inputs.json.in
34   "headers": [ {
35     "path" : "DSTROOT/usr/include/asm.h",
36     "type" : "public"
37   }],
38   "version": "3"
41 //--- expected.tbd
43   "main_library": {
44     "compatibility_versions": [
45       {
46         "version": "0"
47       }
48     ],
49     "current_versions": [
50       {
51         "version": "0"
52       }
53     ],
54     "exported_symbols": [
55       {
56         "data": {
57           "objc_class": [
58             "SomeClass"
59           ],
60           "objc_eh_type": [
61             "SomeClass"
62           ],
63           "objc_ivar": [
64             "NSString._ivar1",
65             "SomeClass._ivar1"
66           ]
67         }
68       }
69     ],
70     "flags": [
71       {
72         "attributes": [
73           "not_app_extension_safe"
74         ]
75       }
76     ],
77     "install_names": [
78       {
79         "name": "@rpath/lib/libasm.dylib"
80       }
81     ],
82     "target_info": [
83       {
84         "min_deployment": "13.1",
85         "target": "arm64-macos"
86       }
87     ]
88   },
89   "tapi_tbd_version": 5