Factorize condition insertion code out of build_check_stmt
authorDodji Seketeli <dodji@redhat.com>
Mon, 12 Nov 2012 15:53:12 +0000 (15:53 +0000)
committerDodji Seketeli <dodji@gcc.gnu.org>
Mon, 12 Nov 2012 15:53:12 +0000 (16:53 +0100)
commit01452015d7d9b18b1dfa4c7343cc6f84f8038b7e
tree58f6a8d08631badb3698e59ee76a7fabdd850d82
parentdc29bf1eefe6dcc9c1db8249ac732d55d8a62539
Factorize condition insertion code out of build_check_stmt

This patch splits a new create_cond_insert_point_before_iter function
out of build_check_stmt, to be used by a later patch.

Tested by running cc1 -fasan on the test program below with and
without the patch and by inspecting the gimple output to see that
there is no change.

void
foo ()
{
  char foo[1] = {0};

  foo[0] = 1;
}

gcc/

* asan.c (create_cond_insert_point_before_iter): Factorize out of ...
(build_check_stmt): ... here.

From-SVN: r193439
gcc/ChangeLog
gcc/asan.c