+/* Return true if S is a GIMPLE_DEBUG SOURCE BIND statement. */
+
+static inline bool
+gimple_debug_source_bind_p (const_gimple s)
+{
+ if (is_gimple_debug (s))
+ return s->gsbase.subcode == GIMPLE_DEBUG_SOURCE_BIND;
+
+ return false;
+}
+
+/* Return the variable bound in a GIMPLE_DEBUG source bind statement. */
+
+static inline tree
+gimple_debug_source_bind_get_var (gimple dbg)
+{
+ GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
+ gcc_gimple_checking_assert (gimple_debug_source_bind_p (dbg));
+ return gimple_op (dbg, 0);
+}
+
+/* Return the value bound to the variable in a GIMPLE_DEBUG source bind
+ statement. */
+
+static inline tree
+gimple_debug_source_bind_get_value (gimple dbg)
+{
+ GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
+ gcc_gimple_checking_assert (gimple_debug_source_bind_p (dbg));
+ return gimple_op (dbg, 1);
+}
+
+/* Return a pointer to the value bound to the variable in a
+ GIMPLE_DEBUG source bind statement. */
+
+static inline tree *
+gimple_debug_source_bind_get_value_ptr (gimple dbg)
+{
+ GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
+ gcc_gimple_checking_assert (gimple_debug_source_bind_p (dbg));
+ return gimple_op_ptr (dbg, 1);
+}
+
+/* Set the variable bound in a GIMPLE_DEBUG source bind statement. */
+
+static inline void
+gimple_debug_source_bind_set_var (gimple dbg, tree var)
+{
+ GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
+ gcc_gimple_checking_assert (gimple_debug_source_bind_p (dbg));
+ gimple_set_op (dbg, 0, var);
+}
+
+/* Set the value bound to the variable in a GIMPLE_DEBUG source bind
+ statement. */
+
+static inline void
+gimple_debug_source_bind_set_value (gimple dbg, tree value)
+{
+ GIMPLE_CHECK (dbg, GIMPLE_DEBUG);
+ gcc_gimple_checking_assert (gimple_debug_source_bind_p (dbg));
+ gimple_set_op (dbg, 1, value);
+}
+