libabigail
Public Member Functions | List of all members
location_manager Class Reference

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 integral 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...
 

Detailed Description

The entry point to manage locations.

This type keeps a table of all the locations for tokens of a given translation unit.

Definition at line 440 of file abg-ir.h.

Member Function Documentation

◆ create_new_location()

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 integral type that represents the index of the source locus triplet into our source locus table.

Parameters
file_paththe file path of the source locus
linethe line number of the source location
colthe column number of the source location

Definition at line 518 of file abg-ir.cc.

◆ expand_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.

Parameters
locationthe instance of location type to expand
paththe resulting path of the source locus
linethe resulting line of the source locus
columnthe resulting colum of the source locus

Definition at line 541 of file abg-ir.cc.


The documentation for this class was generated from the following files: