function-tests.c: expose selftest::make_fndecl for use elsewhere

This is used by new selftests in the analyzer patch kit.

gcc/ChangeLog:
	* function-tests.c (selftest::make_fndecl): Make non-static.
	* selftest.h (selftest::make_fndecl): New decl.

From-SVN: r279242
This commit is contained in:
David Malcolm 2019-12-11 18:58:56 +00:00 committed by David Malcolm
parent 3455115379
commit 0230c89710
3 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2019-12-11 David Malcolm <dmalcolm@redhat.com>
* function-tests.c (selftest::make_fndecl): Make non-static.
* selftest.h (selftest::make_fndecl): New decl.
2019-12-11 Lewis Hyatt <lhyatt@gmail.com>
PR 91853

View file

@ -82,11 +82,11 @@ namespace selftest {
/* Helper function for selftests of function-creation. */
static tree
tree
make_fndecl (tree return_type,
const char *name,
vec <tree> &param_types,
bool is_variadic = false)
bool is_variadic)
{
tree fn_type;
if (is_variadic)

View file

@ -171,6 +171,13 @@ class line_table_test
~line_table_test ();
};
/* Helper function for selftests that need a function decl. */
extern tree make_fndecl (tree return_type,
const char *name,
vec <tree> &param_types,
bool is_variadic = false);
/* Run TESTCASE multiple times, once for each case in our test matrix. */
extern void