Optimize filterArchStruct when nothing is filtered

Runtime-created struct types have limit on the name of the type,
which is the full text of the fields in the struct.  Avoid creating
runtime struct types when filtering produces an identical struct.
Also add tests and godoc for filterArchStruct.

Test: arch_test.go
Change-Id: If7eb27ea9e72073d5252e93f2110b08889ed76b1
This commit is contained in:
Colin Cross
2019-01-24 14:58:11 -08:00
parent ea5c1f453c
commit cb9880786d
3 changed files with 282 additions and 22 deletions

View File

@@ -71,6 +71,7 @@ bootstrap_go_package {
"android/env.go",
],
testSrcs: [
"android/arch_test.go",
"android/config_test.go",
"android/expand_test.go",
"android/namespace_test.go",