Revamps the way the exporter tracks exported types and imported packages that need to be mentioned in the export data.
The previous implementation wasn't properly handling the case where an exported non-inlinable function refers to an imported type whose method set includes an inlinable function whose body makes a call to a function in another package that's not directly used in the original package.
This patch integrates together two existing traversal helper classes, "Collect_references_from_inline" and "Find_types_to_prepare" into a single helper "Collect_export_references", so as to have common/shared code that looks for indirectly imported packages.
adaf97d3009 compiler: rework type and package tracking in exporter
gcc/go/gofrontend/MERGE | 2 +-
gcc/go/gofrontend/export.cc | 649 +++++++++++++++++++++++++-------------------
gcc/go/gofrontend/export.h | 19 +-
gcc/go/gofrontend/gogo.h | 2 +-
gcc/go/gofrontend/names.cc | 2 +-
5 files changed, 384 insertions(+), 290 deletions(-)