Copyright 2021 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

package symbol

import (
	
	
)
IntroducedHistory returns a map of the first version when a symbol name is added to the API, to the symbol name, to the UnitSymbol struct. The UnitSymbol.Children field will always be empty, as children names are also tracked.
Generate a map of the symbol names for each build context, and the first version when that symbol name was found in the package.
	 := map[internal.BuildContext]map[string]string{}
	for ,  := range .Versions() {
		 := .SymbolsAtVersion()
		for ,  := range  {
			for ,  := range  {
				for ,  := range .BuildContexts() {
					if ,  := []; ! {
						[] = map[string]string{}
					}
					if ,  := [][.Name]; ! {
						[][.Name] = 
					}
				}
			}
		}
	}
Using the map of buildToNameToVersion, construct a symbol history, where version is the first version when the symbol name was found in the package.
	 = internal.NewSymbolHistory()
	for ,  := range  {
		for ,  := range  {
			,  := .GetSymbol(, , )
			if  != nil {
				return nil, 
			}
			.AddSymbol(*, , )
		}
	}
	return , nil