libabigail
|
The entry point to manage locations. More...
#include <abg-ir.h>
Public Member Functions | |
location | create_new_location (const std::string &fle, size_t lne, size_t col) |
Insert the triplet representing a source locus into our internal vector of location triplet. Return an instance of location type, built from an real type that represents the index of the source locus triplet into our source locus table. More... | |
void | expand_location (const location &location, std::string &path, unsigned &line, unsigned &column) const |
Given an instance of location type, return the triplet {path,line,column} that represents the source locus. Note that the location must have been previously created from the function location_manager::create_new_location, otherwise this function yields unexpected results, including possibly a crash. More... | |
The entry point to manage locations.
This type keeps a table of all the locations for tokens of a given translation unit.
location_manager | ( | ) |
location create_new_location | ( | const std::string & | file_path, |
size_t | line, | ||
size_t | col | ||
) |
Insert the triplet representing a source locus into our internal vector of location triplet. Return an instance of location type, built from an real type that represents the index of the source locus triplet into our source locus table.
file_path | the file path of the source locus |
line | the line number of the source location |
col | the column number of the source location |
void expand_location | ( | const location & | location, |
std::string & | path, | ||
unsigned & | line, | ||
unsigned & | column | ||
) | const |
Given an instance of location type, return the triplet {path,line,column} that represents the source locus. Note that the location must have been previously created from the function location_manager::create_new_location, otherwise this function yields unexpected results, including possibly a crash.
location | the instance of location type to expand |
path | the resulting path of the source locus |
line | the resulting line of the source locus |
column | the resulting colum of the source locus |