aboutsummaryrefslogtreecommitdiff
path: root/gcc/timevar.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/timevar.h')
-rw-r--r--gcc/timevar.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/timevar.h b/gcc/timevar.h
index 7097700..3465304 100644
--- a/gcc/timevar.h
+++ b/gcc/timevar.h
@@ -229,6 +229,14 @@ class auto_timevar
m_timer->push (m_tv);
}
+ explicit auto_timevar (timevar_id_t tv)
+ : m_timer (g_timer)
+ , m_tv (tv)
+ {
+ if (m_timer)
+ m_timer->push (m_tv);
+ }
+
~auto_timevar ()
{
if (m_timer)