Clone lists before modifying
authorKlaus Aehlig <aehlig@google.com>
Tue, 10 Nov 2015 15:40:47 +0000 (16:40 +0100)
committerKlaus Aehlig <aehlig@google.com>
Tue, 10 Nov 2015 16:14:55 +0000 (17:14 +0100)
commit16eadcfc5582f676a9561dd75675c31c8a823ba9
tree6e575bca43366d1a3e321d6ed1e94e704fafc3bd
parent37db42dc4b866ea2df59b1e798eac1732f34a33d
Clone lists before modifying

When an opcode expands to a list of jobs, we extend the reason trail
of the new jobs with that of the original opcode that expanded to them.
Before modifying the reason trail, however, we should duplicate it to
avoid side effects on shared copies---like the default empty list.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Lisa Velden <velden@google.com>
lib/mcpu.py