LCOV - code coverage report
Current view: top level - base_comm/resources/ccu/ccu_representation/interface - ccu_funccall.cc (source / functions) Coverage Total Hit
Test: coverage.info Lines: 92.9 % 14 13
Test Date: 2026-07-28 12:11:00 Functions: 100.0 % 3 3

            Line data    Source code
       1              : /*
       2              :  * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
       3              :  * Description: ccu representation implementation file
       4              :  * Author: sunzhepeng
       5              :  * Create: 2024-06-17
       6              :  */
       7              : 
       8              : #include "ccu_rep_v1.h"
       9              : #include "ccu_kernel.h"
      10              : #include "ccu_interface_assist_v1.h"
      11              : 
      12              : #include "string_util.h"
      13              : #include "exception_util.h"
      14              : #include "ccu_api_exception.h"
      15              : 
      16              : #include "ccu_ins_generater_base.h"
      17              : 
      18              : namespace hcomm {
      19              : namespace CcuRep {
      20              : 
      21            2 : FuncCall::FuncCall(CcuRepContext *context, std::string label) : context(context), label(label)
      22              : {
      23            2 :     CcuInsGeneraterBase* insGenPtr = context->GetInsGenerator();
      24            2 :     Hccl::CHECK_NULLPTR(insGenPtr, "[FuncCall::FuncCall](label) insGenPtr is nullptr!");
      25            2 :     repFuncCall = std::make_shared<CcuRepFuncCall>(insGenPtr, label);
      26            2 : }
      27              : 
      28            1 : FuncCall::FuncCall(CcuRepContext *context, const Variable &funcAddr) : context(context)
      29              : {
      30            1 :     CcuInsGeneraterBase* insGenPtr = context->GetInsGenerator();
      31            1 :     Hccl::CHECK_NULLPTR(insGenPtr, "[FuncCall::FuncCall](funcAddr) insGenPtr is nullptr!");
      32            1 :     repFuncCall = std::make_shared<CcuRepFuncCall>(insGenPtr, funcAddr);
      33            1 : }
      34              : 
      35            3 : void FuncCall::AppendToContext()
      36              : {
      37            3 :     if (context == nullptr) {
      38            0 :         Hccl::THROW<Hccl::CcuApiException>("context is nullptr, func call, append to context");
      39              :     }
      40            3 :     return context->Append(repFuncCall);
      41              : }
      42              : 
      43              : }; // namespace CcuRep
      44              : }; // namespace hcomm
        

Generated by: LCOV version 2.0-1