Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
91751396
Commit
91751396
authored
Jul 26, 2012
by
Matthias Braun
Browse files
make get_op_ops result non-const
so external users can set their own opcode functions.
parent
6de33165
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/libfirm/irop.h
View file @
91751396
...
...
@@ -307,7 +307,7 @@ FIRM_API void ir_op_set_fragile_indices(ir_op *op, int pn_x_regular,
int
pn_x_except
);
/** Returns the ir_op_ops of an ir_op. */
FIRM_API
const
ir_op_ops
*
get_op_ops
(
const
ir_op
*
op
);
FIRM_API
ir_op_ops
*
get_op_ops
(
ir_op
*
op
);
/** @} */
...
...
ir/be/bearch.c
View file @
91751396
...
...
@@ -70,16 +70,13 @@ arch_env_t *arch_env_begin_codegeneration(const arch_isa_if_t *isa_if,
*/
static
const
arch_irn_ops_t
*
get_irn_ops
(
const
ir_node
*
irn
)
{
const
ir_op
*
ops
;
const
arch_irn_ops_t
*
be_ops
;
if
(
is_Proj
(
irn
))
{
irn
=
get_Proj_pred
(
irn
);
assert
(
!
is_Proj
(
irn
));
}
ops
=
get_irn_op
(
irn
);
be_ops
=
get_op_ops
(
ops
)
->
be_ops
;
ir_op
*
ops
=
get_irn_op
(
irn
);
const
arch_irn_ops_t
*
be_ops
=
get_op_ops
(
ops
)
->
be_ops
;
return
be_ops
;
}
...
...
ir/ir/irop.c
View file @
91751396
...
...
@@ -191,7 +191,7 @@ void (set_generic_function_ptr)(ir_op *op, op_func func)
set_generic_function_ptr_
(
op
,
func
);
}
const
ir_op_ops
*
(
get_op_ops
)(
const
ir_op
*
op
)
ir_op_ops
*
(
get_op_ops
)(
ir_op
*
op
)
{
return
get_op_ops_
(
op
);
}
...
...
ir/ir/irop_t.h
View file @
91751396
...
...
@@ -144,7 +144,7 @@ static inline op_func get_generic_function_ptr_(const ir_op *op)
return
op
->
ops
.
generic
;
}
static
inline
const
ir_op_ops
*
get_op_ops_
(
const
ir_op
*
op
)
static
inline
ir_op_ops
*
get_op_ops_
(
ir_op
*
op
)
{
return
&
op
->
ops
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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