aboutsummaryrefslogtreecommitdiff
path: root/gcc/selftest.h
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2016-10-12 14:55:47 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2016-10-12 14:55:47 +0000
commit7d37ffeee90cbe4f6e3882e009411c6a845b4630 (patch)
treea22a8a2aa4940831b986332ea86b0125547dedfc /gcc/selftest.h
parentf92d15222878878d23dcc0ab54d4e3e7660608d2 (diff)
downloadgcc-7d37ffeee90cbe4f6e3882e009411c6a845b4630.zip
gcc-7d37ffeee90cbe4f6e3882e009411c6a845b4630.tar.gz
gcc-7d37ffeee90cbe4f6e3882e009411c6a845b4630.tar.bz2
Add selftest::read_file
gcc/ChangeLog: * selftest.c (selftest::read_file): New function. (selftest::test_read_file): New function. (selftest::selftest_c_tests): Call test_read_file. * selftest.h (selftest::read_file): New decl. From-SVN: r241055
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 9b6fa95..1a55e4b 100644
--- a/gcc/selftest.h
+++ b/gcc/selftest.h
@@ -146,6 +146,13 @@ class line_table_test
extern void
for_each_line_table_case (void (*testcase) (const line_table_case &));
+/* Read the contents of PATH into memory, returning a 0-terminated buffer
+ that must be freed by the caller.
+ Fail (and abort) if there are any problems, with LOC as the reported
+ location of the failure. */
+
+extern char *read_file (const location &loc, const char *path);
+
/* Declarations for specific families of tests (by source file), in
alphabetical order. */
extern void bitmap_c_tests ();