libstdc++: Fix find_last_set(simd_mask) to ignore padding bits
[official-gcc.git] / gcc / go / gofrontend / go-encode-id.h
blobcbafd5447d6f33d543e589d52bb6b1820a8cd39d
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.
7 #ifndef GO_ENCODE_ID_H
8 #define GO_ENCODE_ID_H
10 #include "backend.h"
12 // Given an identifier that will appear in assembly code, this helper
13 // returns TRUE if the identifier needs special encoding to be used as
14 // an ASM name, FALSE if the name is OK as is.
15 extern bool
16 go_id_needs_encoding(const std::string& str);
18 // Encodes the specified identifier for ASM name safety, returning a
19 // string with the encoded value.
20 extern std::string
21 go_encode_id(const std::string &id);
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);
28 // Encodes a struct tag that appears in a type literal encoding.
29 extern std::string
30 go_mangle_struct_tag(const std::string& tag);
32 #endif // !defined(GO_ENCODE_ID_H)