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

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 448 of file abg-ir.h.

Constructor & Destructor Documentation

◆ location_manager()

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

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 real 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 507 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 530 of file abg-ir.cc.


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