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]->getKeyData();
105 unsigned LineNo,
int FilenameID);
107 unsigned LineNo,
int FilenameID,
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". This is -1 if not specified...
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,.
ID
Defines the set of possible language-specific address spaces.
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)
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
const char * getFilename(unsigned ID) const
void AddLineNote(FileID FID, unsigned Offset, unsigned LineNo, int FilenameID)
unsigned LineNo
The presumed line number of this line entry: #line 4.
Defines the clang::SourceLocation class and associated facilities.