From b4d216f6e206dab4c37d80bfb91b76e2776cb9ef Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 30 Jan 2015 15:57:59 +0000 Subject: compiler: Add pkgpath symbol information to export data. This adds the pkgpath symbol to the export data whenever it is needed--whenever the pkgpath symbol is not the obvious transformation of the pkgpath. This lets us determine the correct symbol name for indirectly imported packages compiled with -fgo-prefix. From-SVN: r220291 --- gcc/go/gofrontend/export.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/go/gofrontend/export.h') diff --git a/gcc/go/gofrontend/export.h b/gcc/go/gofrontend/export.h index c010a14..0526e9a 100644 --- a/gcc/go/gofrontend/export.h +++ b/gcc/go/gofrontend/export.h @@ -120,6 +120,7 @@ class Export : public String_dump // PREFIX is the package prefix. PKGPATH is the package path. // Only one of PREFIX and PKGPATH will be non-empty. // PACKAGE_PRIORITY is the priority to use for this package. + // PACKAGES is all the packages we have seen. // IMPORTS is the explicitly imported packages. // IMPORT_INIT_FN is the name of the import initialization function // for this package; it will be empty if none is needed. @@ -130,6 +131,7 @@ class Export : public String_dump const std::string& prefix, const std::string& pkgpath, int package_priority, + const std::map& packages, const std::map& imports, const std::string& import_init_fn, const std::set& imported_init_fns, @@ -163,6 +165,10 @@ class Export : public String_dump Export(const Export&); Export& operator=(const Export&); + // Write out all known packages. + void + write_packages(const std::map& packages); + // Write out the imported packages. void write_imports(const std::map& imports); -- cgit v1.1