aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/export.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2015-01-30 00:35:44 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2015-01-30 00:35:44 +0000
commit2e29434de909a71522122f18fc66efd40c23ce8b (patch)
tree63c941536dee068ef77d7e77c6f5e54b9f6bc337 /gcc/go/gofrontend/export.h
parent15b127290b48b90e2cb9fabbb7c2a09eade6a9c9 (diff)
downloadgcc-2e29434de909a71522122f18fc66efd40c23ce8b.zip
gcc-2e29434de909a71522122f18fc66efd40c23ce8b.tar.gz
gcc-2e29434de909a71522122f18fc66efd40c23ce8b.tar.bz2
compiler: Fix -fgo-prefix handling.
There was bug in the fix for PR 61880: it only worked fully correctly for code compiled with -fgo-pkgpath. For code that used -fgo-prefix, or that used neither option, the '.' separating the prefix and the package name was converted to an underscore, which did not happen before. This broke SWIG and any other code that expected specific symbol names. Fortunately all code compiled in libgo and all code compiled by the go tool uses -fgo-pkgpath, so this probably did not affect very many people. This is an incomplete fix that does not modify the package file format, for use on both mainline and the GCC 4.9 branch. A follow on patch will fully fix the problem. From-SVN: r220268
Diffstat (limited to 'gcc/go/gofrontend/export.h')
-rw-r--r--gcc/go/gofrontend/export.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/export.h b/gcc/go/gofrontend/export.h
index c6a4810..c010a14 100644
--- a/gcc/go/gofrontend/export.h
+++ b/gcc/go/gofrontend/export.h
@@ -117,14 +117,17 @@ class Export : public String_dump
// Export the identifiers in BINDINGS which are marked for export.
// The exporting is done via a series of calls to THIS->STREAM_. If
// is nothing to export, this->stream_->write will not be called.
- // PKGPATH is the package path.
+ // 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.
+ // 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.
// IMPORTED_INIT_FNS is the list of initialization functions for
// imported packages.
void
export_globals(const std::string& package_name,
+ const std::string& prefix,
const std::string& pkgpath,
int package_priority,
const std::map<std::string, Package*>& imports,