diff options
Diffstat (limited to 'gcc/recog.h')
-rw-r--r-- | gcc/recog.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/recog.h b/gcc/recog.h index 269094a..e96e66e 100644 --- a/gcc/recog.h +++ b/gcc/recog.h @@ -547,13 +547,19 @@ class insn_change_watermark { public: insn_change_watermark () : m_old_num_changes (num_validated_changes ()) {} - ~insn_change_watermark () { cancel_changes (m_old_num_changes); } + ~insn_change_watermark (); void keep () { m_old_num_changes = num_validated_changes (); } private: int m_old_num_changes; }; +inline insn_change_watermark::~insn_change_watermark () +{ + if (m_old_num_changes < num_validated_changes ()) + cancel_changes (m_old_num_changes); +} + #endif #endif /* GCC_RECOG_H */ |