summaryrefslogtreecommitdiff
path: root/gcc/gcov-io.h
diff options
context:
space:
mode:
authortejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-22 14:06:08 +0000
committertejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-22 14:06:08 +0000
commitf19199018c8432d73b3a5c45d4dbc736ebdd9c79 (patch)
treec6ba216b23b093c7937d812160fcf3dfafedbe7a /gcc/gcov-io.h
parent3c82ff7f84cb0f1223d825e5196643e39cdf1a5f (diff)
downloadgcc-f19199018c8432d73b3a5c45d4dbc736ebdd9c79.tar.gz
2014-05-22 Teresa Johnson <tejohnson@google.com>
* gcov-io.c (gcov_position): Use gcov_nonruntime_assert. (gcov_is_error): Remove gcc_assert from IN_LIBGCOV code. (gcov_rewrite): Use gcov_nonruntime_assert. (gcov_open): Ditto. (gcov_write_words): Ditto. (gcov_write_length): Ditto. (gcov_read_words): Use gcov_nonruntime_assert, and remove gcc_assert from IN_LIBGCOV code. (gcov_read_summary): Use gcov_error to flag profile corruption. (gcov_sync): Use gcov_nonruntime_assert. (gcov_seek): Remove gcc_assert from IN_LIBGCOV code. (gcov_histo_index): Use gcov_nonruntime_assert. (static void gcov_histogram_merge): Ditto. (compute_working_sets): Ditto. * gcov-io.h (gcov_nonruntime_assert): Define. (gcov_error): Define for !IN_LIBGCOV * libgcov-driver.c (gcov_error): Move declaration before gcov-io.c include. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210805 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcov-io.h')
-rw-r--r--gcc/gcov-io.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h
index cbf95cfc552..1a9f07694e8 100644
--- a/gcc/gcov-io.h
+++ b/gcc/gcov-io.h
@@ -195,6 +195,13 @@ typedef unsigned HOST_WIDEST_INT gcov_type_unsigned;
#define GCOV_LINKAGE extern
#endif
+#if IN_LIBGCOV
+#define gcov_nonruntime_assert(EXPR) ((void)(0 && (EXPR)))
+#else
+#define gcov_nonruntime_assert(EXPR) gcc_assert (EXPR)
+#define gcov_error(...) fatal_error (__VA_ARGS__)
+#endif
+
/* File suffixes. */
#define GCOV_DATA_SUFFIX ".gcda"
#define GCOV_NOTE_SUFFIX ".gcno"