diff options
author | 2024-10-05 15:25:09 -0700 | |
---|---|---|
committer | 2024-10-07 20:13:00 -0700 | |
commit | b8533a82cdbccb86e268bd3df9319f4cf6c9193b (patch) | |
tree | 39be5b15ffef558eaf0b3cbe882d594d7b467754 /android/mutator_test.go | |
parent | b2388e3e3d67ab20292ada184bfbeb32d65d7d4c (diff) |
Annotate mutators that use methods that prevent mutator coalescing
Mutator coalescing reduces the overhead of visiting every module
for every mutator by calling a series of mutator methods on a
a single module in a row. This is only valid for well-behaved
mutators. Add methods on MutatorHandle that allow annotating
mutators that are not well behaved, and use that to prevent
coalescing mutators.
Bug: 372076859
Test: all soong tests pass with race detector on
Flag: EXEMPT refactor
Change-Id: Id9b005f05227e5558cac6d488030a7398af13fb8
Diffstat (limited to 'android/mutator_test.go')
-rw-r--r-- | android/mutator_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/android/mutator_test.go b/android/mutator_test.go index 88bf1d2ea..33fca9e8b 100644 --- a/android/mutator_test.go +++ b/android/mutator_test.go @@ -158,7 +158,7 @@ func TestModuleString(t *testing.T) { ctx.BottomUp("rename_bottom_up", func(ctx BottomUpMutatorContext) { moduleStrings = append(moduleStrings, ctx.Module().String()) ctx.Rename(ctx.Module().base().Name() + "_renamed1") - }) + }).UsesRename() ctx.BottomUp("final", func(ctx BottomUpMutatorContext) { moduleStrings = append(moduleStrings, ctx.Module().String()) }) |