aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/gogo.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2023-06-26 09:57:21 -0700
committerIan Lance Taylor <iant@golang.org>2023-06-26 09:57:21 -0700
commitaa1e672b5d99102b03eb5fb9c51609c45f62bff7 (patch)
tree886212591b1c9d127eaaf234a4a2e22452ea384a /gcc/go/gofrontend/gogo.h
parent97e31a0a2a2d2273687fcdb4e5416aab1a2186e1 (diff)
parent3a39a31b8ae9c6465434aefa657f7fcc86f905c0 (diff)
downloadgcc-devel/gccgo.zip
gcc-devel/gccgo.tar.gz
gcc-devel/gccgo.tar.bz2
Merge from trunk revision 3a39a31b8ae9c6465434aefa657f7fcc86f905c0.devel/gccgo
Diffstat (limited to 'gcc/go/gofrontend/gogo.h')
-rw-r--r--gcc/go/gofrontend/gogo.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/gogo.h b/gcc/go/gofrontend/gogo.h
index c08a16b..4fd45bf 100644
--- a/gcc/go/gofrontend/gogo.h
+++ b/gcc/go/gofrontend/gogo.h
@@ -393,6 +393,10 @@ class Gogo
set_c_header(const std::string& s)
{ this->c_header_ = s; }
+ // Read an importcfg file.
+ void
+ read_importcfg(const char* filename);
+
// Read an embedcfg file.
void
read_embedcfg(const char* filename);
@@ -1126,6 +1130,10 @@ class Gogo
static size_t
special_name_pos(const std::string& name);
+ // Read a file into memory.
+ static bool
+ read_file(const char* filename, Location loc, std::string* data);
+
private:
// During parsing, we keep a stack of functions. Each function on
// the stack is one that we are currently parsing. For each
@@ -1295,6 +1303,10 @@ class Gogo
std::string relative_import_path_;
// The C header file to write, from the -fgo-c-header option.
std::string c_header_;
+ // Mapping from imports in the source file to the real import paths.
+ Unordered_map(std::string, std::string) import_map_;
+ // Mapping from import paths to files to read.
+ Unordered_map(std::string, std::string) package_file_;
// Patterns from an embedcfg file.
Embed_patterns embed_patterns_;
// Mapping from file to full path from an embedcfg file.