LLVM 20.0.0git
|
Reader for symbol remapping files. More...
#include "llvm/ProfileData/SymbolRemappingReader.h"
Public Types | |
using | Key = uintptr_t |
A Key represents an equivalence class of symbol names. | |
Public Member Functions | |
Error | read (MemoryBuffer &B) |
Read remappings from the given buffer, which must live as long as the remapper. | |
Key | insert (StringRef FunctionName) |
Construct a key for the given symbol, or return an existing one if an equivalent name has already been inserted. | |
Key | lookup (StringRef FunctionName) |
Map the given symbol name into the key for the corresponding equivalence class. | |
Reader for symbol remapping files.
Remaps the symbol names in profile data to match those in the program according to a set of rules specified in a given file.
Definition at line 98 of file SymbolRemappingReader.h.
using llvm::SymbolRemappingReader::Key = uintptr_t |
A Key represents an equivalence class of symbol names.
Definition at line 105 of file SymbolRemappingReader.h.
Construct a key for the given symbol, or return an existing one if an equivalent name has already been inserted.
The symbol name must live as long as the remapper.
The result will be Key() if the name cannot be remapped (typically because it is not a valid mangled name).
Definition at line 113 of file SymbolRemappingReader.h.
References llvm::ItaniumManglingCanonicalizer::canonicalize().
Referenced by llvm::InstrProfReaderItaniumRemapper< HashTableImpl >::populateRemappings().
Map the given symbol name into the key for the corresponding equivalence class.
The result will typically be Key() if no equivalent symbol has been inserted, but this is not guaranteed: a Key different from all keys ever returned by insert
may be returned instead.
Definition at line 123 of file SymbolRemappingReader.h.
References llvm::ItaniumManglingCanonicalizer::lookup().
Referenced by llvm::InstrProfReaderItaniumRemapper< HashTableImpl >::getRecords().
Error SymbolRemappingReader::read | ( | MemoryBuffer & | B | ) |
Read remappings from the given buffer, which must live as long as the remapper.
Load a set of name remappings from a text file.
See the documentation at the top of the file for an explanation of the expected format.
Definition at line 28 of file SymbolRemappingReader.cpp.
References llvm::ItaniumManglingCanonicalizer::addEquivalence(), B, llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), llvm::line_iterator::is_at_eof(), llvm::line_iterator::line_number(), llvm::SmallVectorBase< Size_T >::size(), and llvm::Error::success().
Referenced by llvm::InstrProfReaderItaniumRemapper< HashTableImpl >::populateRemappings().