xref: /llvm-project/llvm/test/tools/llvm-readtapi/remove-invalid.test (revision e1f69b863df87227a48f10831b44a2adfba1c80d)
1; RUN: rm -rf %t
2; RUN: split-file %s %t
3; RUN: not llvm-readtapi --remove -arch arm64 %t/libslim.tbd 2>&1 | FileCheck %s
4
5CHECK: {{.*}}libslim.tbd' cannot remove last architecture slice 'arm64'
6
7//--- libslim.tbd
8{
9  "libraries": [
10    {
11      "exported_symbols": [
12        {
13          "data": {
14            "global": [
15              "_sym1"
16            ]
17          }
18        }
19      ],
20      "install_names": [
21        {
22          "name": "/usr/lib/internal/libfat.dylib"
23        }
24      ],
25      "parent_umbrellas": [
26        {
27          "umbrella": "fat"
28        }
29      ],
30      "target_info": [
31        {
32          "target": "arm64-macos"
33        }
34      ]
35    }
36  ],
37  "main_library": {
38    "install_names": [
39      {
40        "name": "/usr/lib/libfat.dylib"
41      }
42    ],
43    "reexported_libraries": [
44      {
45        "names": [
46          "/usr/lib/internal/libfat.dylib"
47        ]
48      }
49    ],
50    "target_info": [
51      {
52        "target": "arm64-macos"
53      }
54    ]
55  },
56  "tapi_tbd_version": 5
57}
58