FreeBSD/contrib/gcc/cp/cp-gimplify.c
/* Genericize an IF_STMT by turning it into a COND_EXPR.  */
Genericize an IF_STMT by turning it into a COND_EXPR.
Genericize an IF_STMT by turning it into a COND_EXPR .
static void
gimplify_if_stmt (tree *stmt_p)
{
  tree stmt, cond, then_, else_;
  stmt = *stmt_p;
  cond = IF_COND (stmt);
  then_ = THEN_CLAUSE (stmt);
  else_ = ELSE_CLAUSE (stmt);
  if (!then_)
    then_ = build_empty_stmt ();
  if (!else_)
    else_ = build_empty_stmt ();
  if (integer_nonzerop (cond) && !TREE_SIDE_EFFECTS (else_))
    stmt = then_;
  else if (integer_zerop (cond) && !TREE_SIDE_EFFECTS (then_))
    stmt = else_;
  else
    stmt = build3 (COND_EXPR, void_type_node, cond, then_, else_);
  *stmt_p = stmt;
}
static void gimplify_if_stmt ( tree * stmt_p ) { tree stmt , cond , then_ , else_ ; stmt = * stmt_p ; cond = IF_COND ( stmt ) ; then_ = THEN_CLAUSE ( stmt ) ; else_ = ELSE_CLAUSE ( stmt ) ; if ( ! then_ ) then_ = build_empty_stmt ( ) ; if ( ! else_ ) else_ = build_empty_stmt ( ) ; if ( integer_nonzerop ( cond ) && ! TREE_SIDE_EFFECTS ( else_ ) ) stmt = then_ ; else if ( integer_zerop ( cond ) && ! TREE_SIDE_EFFECTS ( then_ ) ) stmt = else_ ; else stmt = build3 ( COND_EXPR , void_type_node , cond , then_ , else_ ) ; * stmt_p = stmt ; }
Genericize an IF_STMT by turning it into a COND_EXPR.
Genericize an IF_STMT by turning it into a COND_EXPR .