参照元

説明

  • パス: gcc-8.3/gcc/tree-pretty-print.c?
  • FIXME: これは何?
    • 説明

引数

  • pretty_printer *pp
    • gcc-8.3/gcc/pretty_printer?
  • tree node
  • dump_flags_t flags
    • gcc-8.3/gcc/dump_flags_t?

返り値

  • なし

参考

実装

/* 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;
    • gcc-8.3/gcc/dump_generic_node()?
    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;
    • gcc-8.3/gcc/integer_zerop()?
    • gcc-8.3/gcc/dump_generic_node()?
    default:
      NIY;
    }
}

コメント


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2021-03-22 (月) 17:43:10 (187d)