LCOV - code coverage report
Current view: top level - legacy/ascend950/unified_platform/ccu/ccu_representation/interface - ccu_funccall.cpp (source / functions) Coverage Total Hit
Test: coverage.info Lines: 90.0 % 10 9
Test Date: 2026-08-18 17:47:01 Functions: 100.0 % 3 3

            Line data    Source code
       1              : /**
       2              :  * Copyright (c) 2025 Huawei Technologies Co., Ltd.
       3              :  * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
       4              :  * CANN Open Software License Agreement Version 2.0 (the "License").
       5              :  * Please refer to the License for details. You may not use this file except in compliance with the License.
       6              :  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
       7              :  * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
       8              :  * See LICENSE in the root of the software repository for the full text of the License.
       9              :  */
      10              : 
      11              : #include "ccu_rep.h"
      12              : #include "ccu_ctx.h"
      13              : #include "ccu_interface_assist.h"
      14              : 
      15              : #include "string_util.h"
      16              : #include "exception_util.h"
      17              : #include "ccu_api_exception.h"
      18              : 
      19              : namespace Hccl {
      20              : namespace CcuRep {
      21              : 
      22            2 :     FuncCall::FuncCall(CcuRepContext* context, std::string label) : context(context), label(label)
      23              :     {
      24            2 :         repFuncCall = std::make_shared<CcuRepFuncCall>(label);
      25            2 :     }
      26              : 
      27            2 :     FuncCall::FuncCall(CcuRepContext* context, const Variable& funcAddr) : context(context)
      28              :     {
      29            2 :         repFuncCall = std::make_shared<CcuRepFuncCall>(funcAddr);
      30            2 :     }
      31              : 
      32            4 :     void FuncCall::AppendToContext()
      33              :     {
      34            4 :         if (context == nullptr) {
      35            0 :             THROW<CcuApiException>("context is nullptr");
      36              :         }
      37            4 :         return context->Append(repFuncCall);
      38              :     }
      39              : 
      40              : }; // namespace CcuRep
      41              : }; // namespace Hccl
        

Generated by: LCOV version 2.0-1