Add SymbolTable::getMutableSymbol.
Most of the time, changing a symbol is unwise, but the minifier has
a good excuse--we want to rename lots of symbols across the entire
program.
SymbolTable::operator[] will continue to return a `const Symbol*` as
before. If you want to mutate a symbol, you need to call
`getMutableSymbol` and make your intent very explicit.
The non-constness rippled out into a few places with Vars and Params
(anything that is added to the symbol table can't be const, since the
symbol table now holds non-const pointers) but it's not too spooky.
Change-Id: I3272d3b82d5285f2517047867be6a1be5d029373
Bug: skia:13775
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/586836
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
12 files changed