Hey there. Frequently we want to create a new sequence that contains one element. This is especially common when wrapping things with a BIND or in a TRY block.
I'm tired of typing the same thing over and over. How about a convenience function like this? Index: gimple.h =================================================================== --- gimple.h (revision 134265) +++ gimple.h (working copy) @@ -189,6 +189,17 @@ gimple_seq_empty_p (const_gimple_seq s) } +/* Allocate a new sequence and initialize its first element with STMT. */ + +static inline gimple_seq +gimple_seq_alloc_with_stmt (gimple stmt) +{ + gimple_seq seq = NULL; + gimple_seq_add_stmt (&seq, stmt); + return seq; +}