参照元†
- pretty_printer *pp
- tree node
- dump_flags_t flags
返り値†
/* Prints the name of a call. NODE is the CALL_EXPR_FN of a CALL_EXPR or
the gimple_call_fn of a GIMPLE_CALL. */
void
print_call_name (pretty_printer *pp, tree node, dump_flags_t flags)
{
tree op0 = node;
if (TREE_CODE (op0) == NON_LVALUE_EXPR)
op0 = TREE_OPERAND (op0, 0);
again:
switch (TREE_CODE (op0))
{
case VAR_DECL:
case PARM_DECL:
case FUNCTION_DECL:
dump_function_name (pp, op0, flags);
break;
case ADDR_EXPR:
case INDIRECT_REF:
CASE_CONVERT:
op0 = TREE_OPERAND (op0, 0);
goto again;
case COND_EXPR:
pp_left_paren (pp);
dump_generic_node (pp, TREE_OPERAND (op0, 0), 0, flags, false);
pp_string (pp, ") ? ");
dump_generic_node (pp, TREE_OPERAND (op0, 1), 0, flags, false);
pp_string (pp, " : ");
dump_generic_node (pp, TREE_OPERAND (op0, 2), 0, flags, false);
break;
case ARRAY_REF:
if (TREE_CODE (TREE_OPERAND (op0, 0)) == VAR_DECL)
dump_function_name (pp, TREE_OPERAND (op0, 0), flags);
else
dump_generic_node (pp, op0, 0, flags, false);
break;
case MEM_REF:
if (integer_zerop (TREE_OPERAND (op0, 1)))
{
op0 = TREE_OPERAND (op0, 0);
goto again;
}
/* Fallthru. */
case COMPONENT_REF:
case SSA_NAME:
case OBJ_TYPE_REF:
dump_generic_node (pp, op0, 0, flags, false);
break;
default:
NIY;
}
}
コメント†