aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcov-io.h
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-01 14:08:01 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2005-04-01 14:08:01 +0000
commit631ceed1a81da6f7be4af53112132e9e5259c8e2 (patch)
tree182cf8fa5a93fc8486b3e28c2de7702967ed9a7f /gcc/gcov-io.h
parent0b7784b5318a48d6ce183740d51fad5cccd602a1 (diff)
* gcov-io.h (GCOV_CHECK, GCOV_CHECK_READING,
GCOV_CHECK_WRITING): Remove. (gcov_position, gcov_rewrite): Use gcc_assert. * gcov-io.c (gcov_open, gcov_write_words, gcov_write_length, gcov_read_words, gcov_sync, gcov_seek): Use gcc_assert. * libgcov.c (__gcov_merge_single, __gcov_merge_delta): Use gcc_assert. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97392 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcov-io.h')
-rw-r--r--gcc/gcov-io.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h
index eaa23adcb47..904f5419dba 100644
--- a/gcc/gcov-io.h
+++ b/gcc/gcov-io.h
@@ -546,26 +546,12 @@ GCOV_LINKAGE void gcov_write_length (gcov_position_t /*position*/);
GCOV_LINKAGE time_t gcov_time (void);
#endif
-/* Make sure the library is used correctly. */
-#if IN_LIBGCOV
-#if ENABLE_CHECKING
-#define GCOV_CHECK(EXPR) (!(EXPR) ? abort (), 0 : 0)
-#else
-/* Include EXPR, so that unused variable warnings do not occur. */
-#define GCOV_CHECK(EXPR) ((void)(0 && (EXPR)))
-#endif
-#else
-#define GCOV_CHECK(EXPR) gcc_assert (EXPR)
-#endif
-#define GCOV_CHECK_READING() GCOV_CHECK(gcov_var.mode > 0)
-#define GCOV_CHECK_WRITING() GCOV_CHECK(gcov_var.mode < 0)
-
/* Save the current position in the gcov file. */
static inline gcov_position_t
gcov_position (void)
{
- GCOV_CHECK_READING ();
+ gcc_assert (gcov_var.mode > 0);
return gcov_var.start + gcov_var.offset;
}
@@ -583,7 +569,7 @@ gcov_is_error (void)
static inline void
gcov_rewrite (void)
{
- GCOV_CHECK_READING ();
+ gcc_assert (gcov_var.mode > 0);
gcov_var.mode = -1;
gcov_var.start = 0;
gcov_var.offset = 0;