LLVM
8.0.1
|
Reader for symbol remapping files. More...
#include "llvm/Support/SymbolRemappingReader.h"
Public Types | |
using | Key = uintptr_t |
A Key represents an equivalence class of symbol names. More... | |
Public Member Functions | |
Error | read (MemoryBuffer &B) |
Read remappings from the given buffer, which must live as long as the remapper. More... | |
Key | insert (StringRef FunctionName) |
Construct a key for the given symbol, or return an existing one if an equivalent name has already been inserted. More... | |
Key | lookup (StringRef FunctionName) |
Map the given symbol name into the key for the corresponding equivalence class. More... | |
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.
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.
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(), llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), llvm::StringRef::empty(), llvm::MemoryBuffer::getBufferIdentifier(), llvm::line_iterator::is_at_eof(), llvm::line_iterator::line_number(), llvm::StringRef::ltrim(), Name, llvm::None, ReportError(), llvm::SmallVectorBase::size(), llvm::StringRef::split(), llvm::StringRef::startswith(), llvm::Error::success(), and Success.