1 /** 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef LIBABCKIT_SRC_WRAPPERS_GRAPH_WRAPPER_H 17 #define LIBABCKIT_SRC_WRAPPERS_GRAPH_WRAPPER_H 18 19 #include "libabckit/include/c/metadata_core.h" 20 #include "libabckit/include/c/statuses.h" 21 #include "libabckit/src/ir_impl.h" 22 23 #include <cstdint> 24 #include <cstddef> 25 #include <string> 26 27 #include "libabckit/src/wrappers/abcfile_wrapper.h" 28 #include "libabckit/src/wrappers/pandasm_wrapper.h" 29 30 namespace libabckit { 31 32 class GraphWrapper { 33 public: 34 static void CreateGraphWrappers(AbckitGraph *graph); 35 static AbckitGraph *BuildGraphDynamic(FileWrapper *pf, AbckitIrInterface *irInterface, AbckitFile *file, 36 uint32_t methodOffset); 37 static void *BuildCodeDynamic(AbckitGraph *graph, const std::string &funcName); 38 static void DestroyGraphDynamic(AbckitGraph *graph); 39 }; 40 41 } // namespace libabckit 42 43 #endif // LIBABCKIT_SRC_WRAPPERS_GRAPH_WRAPPER_H 44