Commit 38929082 authored by Matthias Braun's avatar Matthias Braun
Browse files

a const parameter is enough for get_method_XXX()

parent fedd1b41
...@@ -1614,7 +1614,7 @@ FIRM_API ir_type *new_d_type_method(size_t n_param, size_t n_res, ...@@ -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); FIRM_API size_t get_method_n_params(const ir_type *method);
/** Returns the type of the parameter at position pos of a 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. /** Sets the type of the parameter at position pos of a method.
Also changes the type in the pass-by-value representation by just Also changes the type in the pass-by-value representation by just
changing the type of the corresponding entity if the representation is constructed. */ 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); ...@@ -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. */ /** Returns the number of results of a method type. */
FIRM_API size_t get_method_n_ress(const ir_type *method); FIRM_API size_t get_method_n_ress(const ir_type *method);
/** Returns the return type of a method type at position pos. */ /** 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. /** Sets the type of the result at position pos of a method.
Also changes the type in the pass-by-value representation by just Also changes the type in the pass-by-value representation by just
changing the type of the corresponding entity if the representation is constructed. */ changing the type of the corresponding entity if the representation is constructed. */
......
...@@ -1216,7 +1216,7 @@ size_t (get_method_n_params)(const ir_type *method) ...@@ -1216,7 +1216,7 @@ size_t (get_method_n_params)(const ir_type *method)
return _get_method_n_params(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; ir_type *res;
assert(method->type_op == type_method); assert(method->type_op == type_method);
...@@ -1238,7 +1238,7 @@ size_t (get_method_n_ress)(const ir_type *method) ...@@ -1238,7 +1238,7 @@ size_t (get_method_n_ress)(const ir_type *method)
return _get_method_n_ress(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; ir_type *res;
assert(method->type_op == type_method); assert(method->type_op == type_method);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment