brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · a50a6a5 Raw
79 lines · plain
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: sed -e "s|DSTROOT|%/t|g" %t/inputs.json.in > %t/inputs.json4 5// RUN: clang-installapi -target arm64-apple-macos13.1 \6// RUN: -I%t/usr/include -I%t/usr/local/include -dynamiclib \7// RUN: -install_name @rpath/lib/libfunctions.dylib --filetype=tbd-v4 \8// RUN: %t/inputs.json -o %t/outputs.tbd 2>&1 | FileCheck %s --allow-empty9// RUN: llvm-readtapi -compare %t/outputs.tbd %t/expected.tbd 2>&1 | FileCheck %s --allow-empty10 11// CHECK-NOT: error: 12// CHECK-NOT: warning: 13 14//--- usr/include/functions.h15inline int inlined_func(void) { return 1;}16int public(int a);17 18//--- usr/local/include/private_functions.h19__attribute__((visibility("hidden")))20void hidden(void);21 22//--- inputs.json.in23{24  "headers": [ {25    "path" : "DSTROOT/usr/include/functions.h",26    "type" : "public"27  }, 28  {29    "path" : "DSTROOT/usr/local/include/private_functions.h",30    "type" : "private"31  }32  ],33  "version": "3"34}35 36//--- expected.tbd37{38  "main_library": {39    "compatibility_versions": [40      {41        "version": "0"42      }43    ],44    "current_versions": [45      {46        "version": "0"47      }48    ],49    "exported_symbols": [50      {51        "text": {52          "global": [53            "_public"54          ]55        }56      }57    ],58    "flags": [59      {60        "attributes": [61          "not_app_extension_safe"62        ]63      }64    ],65    "install_names": [66      {67        "name": "@rpath/lib/libfunctions.dylib"68      }69    ],70    "target_info": [71      {72        "min_deployment": "13.1",73        "target": "arm64-macos"74      }75    ]76  },77  "tapi_tbd_version": 578}79