aboutsummaryrefslogtreecommitdiff
path: root/gcc/selftest.h
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2019-12-11 18:58:56 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2019-12-11 18:58:56 +0000
commit0230c89710f748153fcab4fb80a7576942922c7d (patch)
tree715b485000a442dd072af129d5897d6db5621a90 /gcc/selftest.h
parent3455115379cef3a84ce8154b6c4316ed7585f73f (diff)
downloadgcc-0230c89710f748153fcab4fb80a7576942922c7d.zip
gcc-0230c89710f748153fcab4fb80a7576942922c7d.tar.gz
gcc-0230c89710f748153fcab4fb80a7576942922c7d.tar.bz2
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
Diffstat (limited to 'gcc/selftest.h')
-rw-r--r--gcc/selftest.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/selftest.h b/gcc/selftest.h
index 48d8480..11bd3b7 100644
--- a/gcc/selftest.h
+++ b/gcc/selftest.h
@@ -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