* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / go / gofrontend / go-encode-id.h
blobb95d97dd1ba19493c5435bf08014b6ca3d882e89
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 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
15 // is OK as is.
16 extern bool
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.
21 extern std::string
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
26 // result.
27 extern std::string
28 go_selectively_encode_id(const std::string &id);
30 #endif // !defined(GO_ENCODE_ID_H)