diff gcc/go/gofrontend/go-encode-id.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line diff
--- a/gcc/go/gofrontend/go-encode-id.h	Thu Oct 25 07:37:49 2018 +0900
+++ b/gcc/go/gofrontend/go-encode-id.h	Thu Feb 13 11:34:05 2020 +0900
@@ -20,6 +20,11 @@
 extern std::string
 go_encode_id(const std::string &id);
 
+// Decodes an encoded ID, returning the original string handed off to
+// go_encode_id().
+extern std::string
+go_decode_id(const std::string &id);
+
 // Returns the empty string if the specified name needs encoding,
 // otherwise invokes go_encode_id on the name and returns the result.
 extern std::string
@@ -29,4 +34,12 @@
 extern std::string
 go_mangle_struct_tag(const std::string& tag);
 
+// Encode a package path.  A package path can contain any arbitrary
+// character, including '.'.  go_encode_id expects that any '.' will
+// be inserted by name mangling in a controlled manner.  So first
+// translate any '.' using the same .x encoding as used by
+// go_mangle_struct_tag.
+extern std::string
+go_mangle_pkgpath(const std::string& pkgpath);
+
 #endif // !defined(GO_ENCODE_ID_H)