aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/export.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-07-02 01:39:19 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-07-02 01:39:19 +0000
commit9badab5db524a44b467d3d4f5a17b3c9be252ec4 (patch)
tree9107a0e2ee18a9d20e6b3e71da0f017675e79319 /gcc/go/gofrontend/export.h
parentb731572b8a1ef42bd21574ddc95616a26e719264 (diff)
downloadgcc-9badab5db524a44b467d3d4f5a17b3c9be252ec4.zip
gcc-9badab5db524a44b467d3d4f5a17b3c9be252ec4.tar.gz
gcc-9badab5db524a44b467d3d4f5a17b3c9be252ec4.tar.bz2
compiler: refactoring in Export class to encapsulate type refs map
Convert the Export::type_refs map from a static object to a field contained (indirectly, via an impl class) in Export itself, for better encapsulation and to be able to reclaim its memory when exporting is done. No change in compiler functionality. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/184170 From-SVN: r272919
Diffstat (limited to 'gcc/go/gofrontend/export.h')
-rw-r--r--gcc/go/gofrontend/export.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/export.h b/gcc/go/gofrontend/export.h
index 910b1db..74bdd94 100644
--- a/gcc/go/gofrontend/export.h
+++ b/gcc/go/gofrontend/export.h
@@ -22,6 +22,7 @@ class Import_init_set;
class Backend;
class Temporary_statement;
class Unnamed_label;
+struct Export_impl;
// Codes used for the builtin types. These are all negative to make
// them easily distinct from the codes assigned by Export::write_type.
@@ -121,6 +122,7 @@ class Export : public String_dump
};
Export(Stream*);
+ ~Export();
// Size of export data magic string (which includes version number).
static const int magic_len = 4;
@@ -262,6 +264,8 @@ class Export : public String_dump
int type_index_;
// Packages we have written out.
Unordered_map(const Package*, int) packages_;
+ // Hidden implementation-specific state.
+ Export_impl* impl_;
};
// An export streamer that puts the export stream in a named section.