This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling.
Synopsis
Declared in <llvm/Support/SourceMgr.h>
class SourceMgr;
Type Aliases
Name |
Description |
Function pointer type for custom diagnostic handlers. |
Enums
Name |
Description |
Severity of a diagnostic message. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this source manager and its owned buffers. |
Assignment operators |
|
Search for a file with the specified name in the current directory or in one of the IncludeDirs. |
|
Add a new source buffer to this source manager. This takes ownership of the memory buffer. |
|
Return the ID of the buffer containing the specified location. |
|
Find the line number for the specified location in the specified file. This method has O(log n) complexity, where n is the number of lines in the buffer. |
|
Given a line and column number in a mapped buffer, turn it into an SMLoc. This will return a null SMLoc if the line/column location is invalid. |
|
Return an SMDiagnostic at the specified location with the specified string. |
|
Open an include file without adding it to this SourceMgr. |
|
Print the include stack ending at |
|
|
|
Return buffer metadata for the buffer with ID |
|
Return the opaque context pointer passed to the diagnostic handler. |
|
Return the currently installed diagnostic handler, if any. |
|
Get a string with the |
|
Return the include directories of this source manager. |
|
Return the line and column for |
|
Return the one‐based ID of the main (first) source buffer. |
|
Return the memory buffer for the buffer with ID |
|
Return the number of source buffers owned by this manager. |
|
Return the include location of the parent of buffer |
|
Return the virtual file system used to find include files. |
|
Prints the include stack of a buffer unless it is a macro instantiation buffer. |
|
Specify a diagnostic handler to be invoked every time PrintMessage is called. |
|
Replace the include search path with |
|
Set the virtual file system used to find include files. |
|
Append all source buffers from |
Non-Member Functions
Name |
Description |
Parse the TableGen file from the main buffer of a SourceMgr. |
|
Create an MCAsmParser instance for parsing assembly similar to gas syntax. |
|
Create an MCAsmParser instance for parsing Microsoft MASM‐style assembly. |
Created with MrDocs