1 // RUN: %offload-tblgen -gen-entry-points -I %S/../../../liboffload/API %s | %fcheck-generic
3 // Check entry point wrapper functions are generated correctly
8 let name = "FunctionA";
9 let desc = "Function A description";
10 let details = [ "Function A detailed information" ];
12 Param<"uint32_t", "ParamA", "Parameter A description">,
13 Param<"uint32_t*", "ParamB", "Parameter B description">,
16 Return<"OL_ERRC_INVALID_VALUE", ["When a value is invalid"]>
21 // The validation function should call the implementation function
22 // CHECK: FunctionA_val
23 // CHECK: return FunctionA_impl(ParamA, ParamB);
25 // CHECK: ol_result_t{{.*}} FunctionA(
27 // The entry point should print tracing output if enabled
28 // CHECK: if (offloadConfig().TracingEnabled) {
29 // CHECK-NEXT: "---> FunctionA";
31 // CHECK: Result = FunctionA_val(ParamA, ParamB);
33 // Tracing should construct a param struct for printing
34 // CHECK: if (offloadConfig().TracingEnabled) {
35 // CHECK: function_a_params_t Params = {&ParamA, &ParamB};
37 // CHECK: return Result;