GCC Code Coverage Report


Directory: src/
File: src/mir/type-method.cpp
Date: 2025-10-24 11:14:59
Exec Total Coverage
Lines: 16 20 80.0%
Functions: 5 7 71.4%
Branches: 0 0 -%

Line Branch Exec Source
1 /* Copyright 2025 Jonathan S. Arney
2 *
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 * https://github.com/jarney/gyoji/blob/master/LICENSE
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 #include <gyoji-mir/types.hpp>
16 #include <variant>
17 #include <stdio.h>
18
19 using namespace Gyoji::context;
20 using namespace Gyoji::mir;
21
22 8 TypeMethod::TypeMethod(
23 std::string _method_name,
24 const Gyoji::context::SourceReference & _source_ref,
25 const Type *_class_type,
26 const Type *_return_type,
27 const std::vector<Argument> _arguments
28 8 )
29 8 : method_name(_method_name)
30 8 , source_ref(_source_ref)
31 8 , class_type(_class_type)
32 8 , return_type(_return_type)
33 8 , arguments(_arguments)
34 8 {}
35 40 TypeMethod::~TypeMethod()
36 40 {}
37
38 const std::string &
39 TypeMethod::get_name() const
40 { return method_name; }
41
42 const Gyoji::context::SourceReference &
43 TypeMethod::get_source_ref() const
44 { return source_ref; }
45
46 const Type *
47 8 TypeMethod::get_class_type() const
48 8 { return class_type; }
49
50 const Type *
51 14 TypeMethod::get_return_type() const
52 14 { return return_type; }
53
54 const std::vector<Argument> &
55 26 TypeMethod::get_arguments() const
56 26 { return arguments; }
57