diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-08 19:53:10 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-08 19:53:10 +0000 |
commit | c71175b73a3008e16608841d12203691560af713 (patch) | |
tree | b52073aa37e9b0af44b23f56380a4129842565e2 /gcc/basic-block.h | |
parent | c82d157a5d6f77c0ae3b4f8e1eadad16ed60df27 (diff) | |
download | gcc-c71175b73a3008e16608841d12203691560af713.tar.gz |
* basic-block.h (single_succ_edge, single_pred_edge, ei_container,
ei_next, ei_prev): Do sanity checking with ENABLE_CHECKING only.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160446 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/basic-block.h')
-rw-r--r-- | gcc/basic-block.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/basic-block.h b/gcc/basic-block.h index 1d8d53beb58..135c0c22a07 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -554,7 +554,9 @@ single_pred_p (const_basic_block bb) static inline edge single_succ_edge (const_basic_block bb) { +#ifdef ENABLE_CHECKING gcc_assert (single_succ_p (bb)); +#endif return EDGE_SUCC (bb, 0); } @@ -564,7 +566,9 @@ single_succ_edge (const_basic_block bb) static inline edge single_pred_edge (const_basic_block bb) { +#ifdef ENABLE_CHECKING gcc_assert (single_pred_p (bb)); +#endif return EDGE_PRED (bb, 0); } @@ -596,7 +600,9 @@ typedef struct { static inline VEC(edge,gc) * ei_container (edge_iterator i) { +#ifdef ENABLE_CHECKING gcc_assert (i.container); +#endif return *i.container; } @@ -647,7 +653,9 @@ ei_one_before_end_p (edge_iterator i) static inline void ei_next (edge_iterator *i) { +#ifdef ENABLE_CHECKING gcc_assert (i->index < EDGE_COUNT (ei_container (*i))); +#endif i->index++; } @@ -655,7 +663,9 @@ ei_next (edge_iterator *i) static inline void ei_prev (edge_iterator *i) { +#ifdef ENABLE_CHECKING gcc_assert (i->index > 0); +#endif i->index--; } |