Add ProgramWriter, a non-const version of ProgramVisitor.

This allows us to traverse a program's hierarchy and make changes (as
long as the structure remains intact). It's the caller's responsibility
to make sure they don't invalidate any iterators of the ProgramWriter.

Change-Id: Icfc651134d916e19b92004c92fe09880bb96600b
Commit-Queue: John Stiles <>
Reviewed-by: Brian Osman <>
Auto-Submit: John Stiles <>
3 files changed