Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
38929082
Commit
38929082
authored
Aug 22, 2011
by
Matthias Braun
Browse files
a const parameter is enough for get_method_XXX()
parent
fedd1b41
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/libfirm/typerep.h
View file @
38929082
...
...
@@ -1614,7 +1614,7 @@ FIRM_API ir_type *new_d_type_method(size_t n_param, size_t n_res,
FIRM_API
size_t
get_method_n_params
(
const
ir_type
*
method
);
/** Returns the type of the parameter at position pos of a method. */
FIRM_API
ir_type
*
get_method_param_type
(
ir_type
*
method
,
size_t
pos
);
FIRM_API
ir_type
*
get_method_param_type
(
const
ir_type
*
method
,
size_t
pos
);
/** Sets the type of the parameter at position pos of a method.
Also changes the type in the pass-by-value representation by just
changing the type of the corresponding entity if the representation is constructed. */
...
...
@@ -1622,7 +1622,7 @@ FIRM_API void set_method_param_type(ir_type *method, size_t pos, ir_type *tp);
/** Returns the number of results of a method type. */
FIRM_API
size_t
get_method_n_ress
(
const
ir_type
*
method
);
/** Returns the return type of a method type at position pos. */
FIRM_API
ir_type
*
get_method_res_type
(
ir_type
*
method
,
size_t
pos
);
FIRM_API
ir_type
*
get_method_res_type
(
const
ir_type
*
method
,
size_t
pos
);
/** Sets the type of the result at position pos of a method.
Also changes the type in the pass-by-value representation by just
changing the type of the corresponding entity if the representation is constructed. */
...
...
ir/tr/type.c
View file @
38929082
...
...
@@ -1216,7 +1216,7 @@ size_t (get_method_n_params)(const ir_type *method)
return
_get_method_n_params
(
method
);
}
ir_type
*
get_method_param_type
(
ir_type
*
method
,
size_t
pos
)
ir_type
*
get_method_param_type
(
const
ir_type
*
method
,
size_t
pos
)
{
ir_type
*
res
;
assert
(
method
->
type_op
==
type_method
);
...
...
@@ -1238,7 +1238,7 @@ size_t (get_method_n_ress)(const ir_type *method)
return
_get_method_n_ress
(
method
);
}
ir_type
*
get_method_res_type
(
ir_type
*
method
,
size_t
pos
)
ir_type
*
get_method_res_type
(
const
ir_type
*
method
,
size_t
pos
)
{
ir_type
*
res
;
assert
(
method
->
type_op
==
type_method
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment