aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/backend.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2012-05-09 21:17:23 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-05-09 21:17:23 +0000
commit097b12fb975ba045fffebc2cb1de407d3dba4bbc (patch)
tree35b68564005a08b6b179869395daba334368b0bc /gcc/go/gofrontend/backend.h
parent1b8b126f386ffff12b02f7c9cb2a00c38996f1ea (diff)
downloadgcc-097b12fb975ba045fffebc2cb1de407d3dba4bbc.zip
gcc-097b12fb975ba045fffebc2cb1de407d3dba4bbc.tar.gz
gcc-097b12fb975ba045fffebc2cb1de407d3dba4bbc.tar.bz2
compiler: Add -fgo-pkgpath option.
* lang.opt: Add -fgo-pkgpath. * go-lang.c (go_pkgpath): New static variable. (go_prefix): New static variable. (go_langhook_init): Pass go_pkgpath and go_prefix to go_create_gogo. (go_langhook_handle_option): Handle -fgo-pkgpath. Change -fgo-prefix handling to just set go_prefix. * go-c.h (go_set_prefix): Don't declare. (go_create_gogo): Add pkgpath and prefix to declaration. * go-gcc.cc (Gcc_backend::global_variable): Change unique_prefix to pkgpath. Don't include the package name in the asm name. * gccgo.texi (Invoking gccgo): Document -fgo-pkgpath. Update the docs for -fgo-prefix. From-SVN: r187356
Diffstat (limited to 'gcc/go/gofrontend/backend.h')
-rw-r--r--gcc/go/gofrontend/backend.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/go/gofrontend/backend.h b/gcc/go/gofrontend/backend.h
index d314045..2b14132 100644
--- a/gcc/go/gofrontend/backend.h
+++ b/gcc/go/gofrontend/backend.h
@@ -321,16 +321,16 @@ class Backend
error_variable() = 0;
// Create a global variable. PACKAGE_NAME is the name of the
- // package where the variable is defined. UNIQUE_PREFIX is the
- // prefix for that package, from the -fgo-prefix option. NAME is
- // the name of the variable. BTYPE is the type of the variable.
- // IS_EXTERNAL is true if the variable is defined in some other
- // package. IS_HIDDEN is true if the variable is not exported (name
- // begins with a lower case letter). LOCATION is where the variable
- // was defined.
+ // package where the variable is defined. PKGPATH is the package
+ // path for that package, from the -fgo-pkgpath or -fgo-prefix
+ // option. NAME is the name of the variable. BTYPE is the type of
+ // the variable. IS_EXTERNAL is true if the variable is defined in
+ // some other package. IS_HIDDEN is true if the variable is not
+ // exported (name begins with a lower case letter). LOCATION is
+ // where the variable was defined.
virtual Bvariable*
global_variable(const std::string& package_name,
- const std::string& unique_prefix,
+ const std::string& pkgpath,
const std::string& name,
Btype* btype,
bool is_external,