gimple-fold.c (strlen_range_kind): New enum.
authorMartin Sebor <msebor@redhat.com>
Mon, 31 Dec 2018 01:01:10 +0000 (01:01 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 31 Dec 2018 01:01:10 +0000 (18:01 -0700)
commit598f7235fb4e9d6c201999d66f1db2b247d74de3
tree89cf4de700b14afe3ba494d93c7e7f9cfb73e54f
parentc43459cad848d5137426676f52976994cc221902
gimple-fold.c (strlen_range_kind): New enum.

* gimple-fold.c (strlen_range_kind): New enum.
(get_range_strlen): Update signature to use strlen_range_kind
instead of type+fuzzy.
(get_range_strlen_tree): Update signature to use
strlen_range_kind instead of type+fuzzy.  Pass rkind down to
get_range_strlen.  Check the rkind enum value instead of
type+fuzzy.
(get_range_strlen): Similarly.
(get_maxval_strlen): Update signature to make NONSTR argument have
a default value and make static.  Add asserts to ensure sanity of
arguments.  Update calls to get_range_strlen.
(gimple_fold_builtin_strcpy): Update calls to get_maxval_strlen.
(gimple_fold_builtin_strcat, gimple_fold_builtin_fputs): Similarly.
(gimple_fold_builtin_memory_chk): Similarly.
(gimple_fold_builtin_stxcpy_chk): Similarly.
(gimple_fold_builtin_snprintf_chk): Similarly.
(gimple_fold_builtin_sprintf, gimple_fold_builtin_snprintf): Similarly.
* gimple-fold.h (get_maxval_strlen): Delete prototype.

Co-Authored-By: Jeff Law <law@redhat.com>
From-SVN: r267482
gcc/ChangeLog
gcc/gimple-fold.c
gcc/gimple-fold.h