Mercurial > hg > CbC > CbC_gcc
comparison 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 |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
18 // Encodes the specified identifier for ASM name safety, returning a | 18 // Encodes the specified identifier for ASM name safety, returning a |
19 // string with the encoded value. | 19 // string with the encoded value. |
20 extern std::string | 20 extern std::string |
21 go_encode_id(const std::string &id); | 21 go_encode_id(const std::string &id); |
22 | 22 |
23 // Decodes an encoded ID, returning the original string handed off to | |
24 // go_encode_id(). | |
25 extern std::string | |
26 go_decode_id(const std::string &id); | |
27 | |
23 // Returns the empty string if the specified name needs encoding, | 28 // Returns the empty string if the specified name needs encoding, |
24 // otherwise invokes go_encode_id on the name and returns the result. | 29 // otherwise invokes go_encode_id on the name and returns the result. |
25 extern std::string | 30 extern std::string |
26 go_selectively_encode_id(const std::string &id); | 31 go_selectively_encode_id(const std::string &id); |
27 | 32 |
28 // Encodes a struct tag that appears in a type literal encoding. | 33 // Encodes a struct tag that appears in a type literal encoding. |
29 extern std::string | 34 extern std::string |
30 go_mangle_struct_tag(const std::string& tag); | 35 go_mangle_struct_tag(const std::string& tag); |
31 | 36 |
37 // Encode a package path. A package path can contain any arbitrary | |
38 // character, including '.'. go_encode_id expects that any '.' will | |
39 // be inserted by name mangling in a controlled manner. So first | |
40 // translate any '.' using the same .x encoding as used by | |
41 // go_mangle_struct_tag. | |
42 extern std::string | |
43 go_mangle_pkgpath(const std::string& pkgpath); | |
44 | |
32 #endif // !defined(GO_ENCODE_ID_H) | 45 #endif // !defined(GO_ENCODE_ID_H) |