brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 8d7aa00 Raw
26 lines · plain
1// RUN: %offload-tblgen -gen-api -I %S/../../../liboffload/API %s | %fcheck-generic --check-prefix=CHECK-API2// RUN: %offload-tblgen -gen-exports -I %S/../../../liboffload/API %s | %fcheck-generic --check-prefix=CHECK-EXPORTS3// RUN: %offload-tblgen -gen-func-names -I %S/../../../liboffload/API %s | %fcheck-generic --check-prefix=CHECK-FUNC-MACRO4 5// Check that the function variant with code location information is generated6// and is otherwise the same as the regular function7 8include "APIDefs.td"9 10def FunctionA : Function {11    let desc = "Function A description";12    let details = [ "Function A detailed information" ];13    let params = [14        Param<"uint32_t", "ParamA", "Parameter A description">,15        Param<"uint32_t*", "ParamB", "Parameter B description">,16    ];17    let returns = [18        Return<"OL_ERRC_INVALID_VALUE", ["When a value is invalid"]>19    ];20}21 22// CHECK-API-DAG: ol_result_t{{.*}} FunctionA23// CHECK-API-DAG: ol_result_t{{.*}} FunctionAWithCodeLoc24// CHECK-EXPORTS: FunctionAWithCodeLoc25// CHECK-FUNC-MACRO: OFFLOAD_FUNC(FunctionAWithCodeLoc)26