Merge remote-tracking branch 'aosp/upstream' into master

* aosp/upstream:
  Export CollapseDuplicateProperties, Soong writedocs uses it

Change-Id: Ib237ea5810b9793725d1b7f6c21286058413b2b7
Test: Manual
Bug: 120512870
This commit is contained in:
Sasha Smundak 2019-02-19 10:55:46 -08:00
commit 012c4ff202

View file

@ -228,7 +228,7 @@ propertyStructLoop:
for _, from := range mt.PropertyStructs {
for _, to := range collapsed {
if from.Name == to.Name {
collapseDuplicateProperties(&to.Properties, &from.Properties)
CollapseDuplicateProperties(&to.Properties, &from.Properties)
continue propertyStructLoop
}
}
@ -237,13 +237,13 @@ propertyStructLoop:
mt.PropertyStructs = collapsed
}
func collapseDuplicateProperties(to, from *[]Property) {
func CollapseDuplicateProperties(to, from *[]Property) {
propertyLoop:
for _, f := range *from {
for i := range *to {
t := &(*to)[i]
if f.Name == t.Name {
collapseDuplicateProperties(&t.Properties, &f.Properties)
CollapseDuplicateProperties(&t.Properties, &f.Properties)
continue propertyLoop
}
}