Move c_getstr to fold-const.c
authorRichard Sandiford <richard.sandiford@arm.com>
Sat, 7 Nov 2015 10:01:52 +0000 (10:01 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Sat, 7 Nov 2015 10:01:52 +0000 (10:01 +0000)
commit5486d91300d0540215978ecde30870e1a337910c
tree0745360532b642227c4b092f57f659a9b65ff873
parenteb0b164e5f7b8fff929e73fdd0a15a6d769ebc1c
Move c_getstr to fold-const.c

Upcoming patches to fold-const-call.c want to use c_getstr, which is
currently defined in builtins.c.  The function doesn't really do anything
related to built-ins, and I'd rather not make fold-const-call.c depend
on builtins.c and builtins.c depend on fold-const-call.c, so this patch
moves the function to fold-const.c instead.

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/
* builtins.h (c_getstr): Move to...
* fold-const.h (c_getstr): ...here.
* builtins.c (c_getstr): Move to...
* fold-const.c (c_getstr): ...here.

From-SVN: r229919
gcc/ChangeLog
gcc/builtins.c
gcc/builtins.h
gcc/fold-const.c
gcc/fold-const.h