aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/export.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2015-01-30 15:57:59 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2015-01-30 15:57:59 +0000
commitb4d216f6e206dab4c37d80bfb91b76e2776cb9ef (patch)
tree23cbad06be89198e0535231e1b38ab8482b41903 /gcc/go/gofrontend/export.h
parent622599c6d2359ad2f43445754be185b0b177430a (diff)
downloadgcc-b4d216f6e206dab4c37d80bfb91b76e2776cb9ef.zip
gcc-b4d216f6e206dab4c37d80bfb91b76e2776cb9ef.tar.gz
gcc-b4d216f6e206dab4c37d80bfb91b76e2776cb9ef.tar.bz2
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
Diffstat (limited to 'gcc/go/gofrontend/export.h')
-rw-r--r--gcc/go/gofrontend/export.h6
1 files changed, 6 insertions, 0 deletions
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<std::string, Package*>& packages,
const std::map<std::string, Package*>& imports,
const std::string& import_init_fn,
const std::set<Import_init>& 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<std::string, Package*>& packages);
+
// Write out the imported packages.
void
write_imports(const std::map<std::string, Package*>& imports);