clang API Documentation

Public Types | Public Member Functions
clang::LineTableInfo Class Reference

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

#include <SourceManagerInternals.h>

List of all members.

Public Types

typedef std::map< FileID,
std::vector< LineEntry >
>::iterator 
iterator

Public Member Functions

 LineTableInfo ()
void clear ()
 ~LineTableInfo ()
unsigned getLineTableFilenameID (StringRef Str)
const char * getFilename (unsigned ID) const
unsigned getNumFilenames () const
void AddLineNote (FileID FID, unsigned Offset, unsigned LineNo, int FilenameID)
void AddLineNote (FileID FID, unsigned Offset, unsigned LineNo, int FilenameID, unsigned EntryExit, SrcMgr::CharacteristicKind FileKind)
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 77 of file SourceManagerInternals.h.


Member Typedef Documentation

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

Definition at line 122 of file SourceManagerInternals.h.


Constructor & Destructor Documentation

Definition at line 91 of file SourceManagerInternals.h.

Definition at line 100 of file SourceManagerInternals.h.


Member Function Documentation

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 280 of file SourceManager.cpp.

void LineTableInfo::AddLineNote ( FileID  FID,
unsigned  Offset,
unsigned  LineNo,
int  FilenameID 
)

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

Definition at line 196 of file SourceManager.cpp.

References clang::SrcMgr::C_User, and clang::LineEntry::get().

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

AddLineNote This is the same as the previous version of AddLineNote, but is used for GNU line markers. 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 227 of file SourceManager.cpp.

References clang::LineEntry::get().

Definition at line 123 of file SourceManagerInternals.h.

void clang::LineTableInfo::clear ( ) [inline]

Definition at line 94 of file SourceManagerInternals.h.

Referenced by clang::SourceManager::clearIDTables().

Definition at line 124 of file SourceManagerInternals.h.

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

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

FindNearestLineEntry - Find the line entry nearest to FID that is before it. If there is no line entry before Offset in FID, return null.

Definition at line 261 of file SourceManager.cpp.

Referenced by clang::SourceManager::getFileCharacteristic(), clang::SourceManager::getPresumedLoc(), and clang::SourceManager::isInMainFile().

const char* clang::LineTableInfo::getFilename ( unsigned  ID) const [inline]

Definition at line 103 of file SourceManagerInternals.h.

Referenced by clang::SourceManager::getPresumedLoc().

Definition at line 179 of file SourceManager.cpp.

Definition at line 107 of file SourceManagerInternals.h.


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