clang 20.0.0git
Public Types | Public Member Functions | List of all members
clang::LineTableInfo Class Reference

Used to hold and unique data used to represent #line information. More...

#include "clang/Basic/SourceManagerInternals.h"

Public Types

using iterator = std::map< FileID, std::vector< LineEntry > >::iterator
 

Public Member Functions

void clear ()
 
unsigned getLineTableFilenameID (StringRef Str)
 
StringRef getFilename (unsigned ID) const
 
unsigned getNumFilenames () const
 
void AddLineNote (FileID FID, unsigned Offset, unsigned LineNo, int FilenameID, unsigned EntryExit, SrcMgr::CharacteristicKind FileKind)
 Add a line note to the line table that indicates that there is a #line or GNU line marker at the specified FID/Offset location which changes the presumed location to LineNo/FilenameID.
 
const LineEntryFindNearestLineEntry (FileID FID, unsigned Offset)
 Find the line entry nearest to FID that is before it.
 
iterator begin ()
 
iterator end ()
 
void AddEntry (FileID FID, const std::vector< LineEntry > &Entries)
 Add a new line entry that has already been encoded into the internal representation of the line table.
 

Detailed Description

Used to hold and unique data used to represent #line information.

Definition at line 80 of file SourceManagerInternals.h.

Member Typedef Documentation

◆ iterator

using clang::LineTableInfo::iterator = std::map<FileID, std::vector<LineEntry> >::iterator

Definition at line 121 of file SourceManagerInternals.h.

Member Function Documentation

◆ AddEntry()

void LineTableInfo::AddEntry ( FileID  FID,
const std::vector< LineEntry > &  Entries 
)

Add a new line entry that has already been encoded into the internal representation of the line table.

Definition at line 267 of file SourceManager.cpp.

◆ AddLineNote()

void LineTableInfo::AddLineNote ( FileID  FID,
unsigned  Offset,
unsigned  LineNo,
int  FilenameID,
unsigned  EntryExit,
SrcMgr::CharacteristicKind  FileKind 
)

Add a line note to the line table that indicates that there is a #line or GNU line marker at the specified FID/Offset location which changes the presumed location to LineNo/FilenameID.

If EntryExit is 0, then this doesn't change the presumed #include stack. If it is 1, this is a file entry, if it is 2 then this is a file exit. FileKind specifies whether this is a system header or extern C system header.

Definition at line 211 of file SourceManager.cpp.

References clang::LineEntry::get().

◆ begin()

iterator clang::LineTableInfo::begin ( )
inline

Definition at line 123 of file SourceManagerInternals.h.

◆ clear()

void clang::LineTableInfo::clear ( )
inline

Definition at line 95 of file SourceManagerInternals.h.

◆ end()

iterator clang::LineTableInfo::end ( )
inline

Definition at line 124 of file SourceManagerInternals.h.

◆ FindNearestLineEntry()

const LineEntry * LineTableInfo::FindNearestLineEntry ( FileID  FID,
unsigned  Offset 
)

Find the line entry nearest to FID that is before it.

FindNearestLineEntry - Find the line entry nearest to FID that is before it.

If there is no line entry before Offset in FID, returns null.

If there is no line entry before Offset in FID, return null.

Definition at line 248 of file SourceManager.cpp.

◆ getFilename()

StringRef clang::LineTableInfo::getFilename ( unsigned  ID) const
inline

Definition at line 103 of file SourceManagerInternals.h.

References ID.

◆ getLineTableFilenameID()

unsigned LineTableInfo::getLineTableFilenameID ( StringRef  Str)

Definition at line 198 of file SourceManager.cpp.

◆ getNumFilenames()

unsigned clang::LineTableInfo::getNumFilenames ( ) const
inline

Definition at line 108 of file SourceManagerInternals.h.


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