GCC Middle and Back End API Reference
|
Public Member Functions | |
string_table () | |
~string_table () | |
int | get_index (const char *name) const |
int | get_index_by_decl (tree decl) const |
const char * | get_name (int index) const |
bool | read () |
Private Types | |
typedef std::map< const char *, unsigned, string_compare > | string_index_map |
Private Attributes | |
string_vector | vector_ |
string_index_map | map_ |
Store a string array, indexed by string position in the array.
|
private |
|
inline |
autofdo::string_table::~string_table | ( | ) |
int autofdo::string_table::get_index | ( | const char * | name | ) | const |
Return the index of a given function NAME. Return -1 if NAME is not found in string table.
Referenced by get_index_by_decl().
int autofdo::string_table::get_index_by_decl | ( | tree | decl | ) | const |
Return the index of a given function DECL. Return -1 if DECL is not found in string table.
References DECL_ABSTRACT_ORIGIN, DECL_ASSEMBLER_NAME, DECL_FROM_INLINE, lang_hooks::dwarf_name, free(), get_index(), get_index_by_decl(), autofdo::get_original_name(), and IDENTIFIER_POINTER.
Referenced by get_index_by_decl().
const char * autofdo::string_table::get_name | ( | int | index | ) | const |
Return the function name of a given INDEX.
References gcc_assert, and vector_.
bool autofdo::string_table::read | ( | ) |
Read the string table. Return TRUE if reading is successful.
References gcov_read_string(), gcov_read_unsigned(), GCOV_TAG_AFDO_FILE_NAMES, autofdo::get_original_name(), i, map_, and vector_.
|
private |
Referenced by get_index(), and read().
|
private |
Referenced by get_name(), read(), and ~string_table().