[LLVM][IR] Use splat syntax when printing ConstantExpr based splats. (#116856)
[llvm-project.git] / clang / test / InstallAPI / variables.test
blob159158a6b91ec76765c0e2c4d3127f60ddeb61a4
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
3 // RUN: sed -e "s|SRC_DIR|%/t|g" %t/vars_inputs.json.in > %t/vars_inputs.json
5 /// Check multiple targets are captured.
6 // RUN: clang-installapi -target arm64-apple-macos13.1 -target arm64e-apple-macos13.1 \
7 // RUN: -fapplication-extension -install_name /usr/lib/vars.dylib -dynamiclib \
8 // RUN: %t/vars_inputs.json -o %t/vars.tbd 2>&1 | FileCheck %s --allow-empty
9 // RUN: llvm-readtapi -compare %t/vars.tbd %t/expected.tbd 2>&1 | FileCheck %s --allow-empty
11 // CHECK-NOT: error:  
12 // CHECK-NOT: warning:  
14 //--- vars.h
15 extern int foo;
17 //--- vars_inputs.json.in
19   "headers": [ {
20     "path" : "SRC_DIR/vars.h",
21     "type" : "public"
22   }],
23   "version": "3"
26 //--- expected.tbd
28   "main_library": {
29     "compatibility_versions": [
30       {
31         "version": "0"
32       }],
33     "current_versions": [
34       {
35         "version": "0"
36       }],
37     "install_names": [
38       {
39         "name": "/usr/lib/vars.dylib"
40       }
41     ],
42     "exported_symbols": [
43       {
44         "data": {
45           "global": [
46             "_foo"
47           ]
48         }
49       }
50     ],
51     "target_info": [
52       {
53         "min_deployment": "13.1",
54         "target": "arm64-macos"
55       },
56       {
57         "min_deployment": "13.1",
58         "target": "arm64e-macos"
59       }
60     ]
61   },
62   "tapi_tbd_version": 5