1 // go-encode-id.h -- Go identifier encoding utilities -*- C++ -*-
3 // Copyright 2016 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
12 // Given an identifier corresponding to a function or variable,
13 // this helper returns TRUE if the identifier needs special
14 // encoding to be used as an ASM name (symbol), FALSE if the name
17 go_id_needs_encoding(const std::string
& str
);
19 // Encodes the specified identifier for ASM name safety, returning a
20 // string with the encoded value.
22 go_encode_id(const std::string
&id
);
24 // Returns the empty string if the specified name needs encoding,
25 // otherwise invokes go_encode_id() on the name and returns the
28 go_selectively_encode_id(const std::string
&id
);
30 #endif // !defined(GO_ENCODE_ID_H)