15 #ifndef LLVM_CLANG_BASIC_SOURCEMANAGERINTERNALS_H
16 #define LLVM_CLANG_BASIC_SOURCEMANAGERINTERNALS_H
20 #include "llvm/ADT/StringMap.h"
84 llvm::StringMap<unsigned, llvm::BumpPtrAllocator> FilenameIDs;
85 std::vector<llvm::StringMapEntry<unsigned>*> FilenamesByID;
89 std::map<FileID, std::vector<LineEntry> > LineEntries;
93 FilenamesByID.clear();
99 assert(ID < FilenamesByID.size() &&
"Invalid FilenameID");
100 return FilenamesByID[
ID]->getKey();
105 unsigned LineNo,
int FilenameID,
StringRef getFilename(unsigned ID) const
unsigned IncludeOffset
The offset of the virtual include stack location, which is manipulated by GNU linemarker directives...
Defines the SourceManager interface.
int FilenameID
The ID of the filename identified by this line entry: #line 4 "foo.c".
unsigned getLineTableFilenameID(StringRef Str)
CharacteristicKind
Indicates whether a file or directory holds normal user code, system code, or system code which is im...
Used to hold and unique data used to represent #line information.
const LineEntry * FindNearestLineEntry(FileID FID, unsigned Offset)
Find the line entry nearest to FID that is before it.
std::map< FileID, std::vector< LineEntry > >::iterator iterator
unsigned FileOffset
The offset in this file that the line entry occurs at.
SrcMgr::CharacteristicKind FileKind
Set the 0 if no flags, 1 if a system header,.
unsigned getNumFilenames() const
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...
bool operator<(DeclarationName LHS, DeclarationName RHS)
Ordering on two declaration names.
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
detail::InMemoryDirectory::const_iterator E
unsigned LineNo
The presumed line number of this line entry: #line 4.
Defines the clang::SourceLocation class and associated facilities.
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 spec...