LLVM API Documentation
#include <SourceFile.h>
Collaboration diagram for llvm::SourceFile:
Public Member Functions | |
SourceFile (const std::string &fn, const GlobalVariable *Desc) | |
~SourceFile () | |
const GlobalVariable * | getDescriptor () const |
const std::string & | getFilename () const |
void | getSourceLine (unsigned LineNo, const char *&LineStart, const char *&LineEnd) const |
unsigned | getNumLines () const |
Definition at line 25 of file SourceFile.h.
|
SourceFile constructor - Read in the specified source file if it exists, but do not build the LineOffsets table until it is requested. This will NOT throw an exception if the file is not found, if there is an error reading it, or if the user cancels the operation. Instead, it will just be an empty source file. Definition at line 53 of file SourceFile.h. |
|
Definition at line 57 of file SourceFile.h. |
|
getDescriptor - Return the debugging decriptor for this source file. Definition at line 63 of file SourceFile.h. |
|
getFilename - Return the fully resolved path that this file was loaded from. Definition at line 67 of file SourceFile.h. |
|
getNumLines - Return the number of lines the source file contains. Definition at line 79 of file SourceFile.h. |
|
getSourceLine - Given a line number, return the start and end of the line in the file. If the line number is invalid, or if the file could not be loaded, null pointers are returned for the start and end of the file. Note that line numbers start with 0, not 1. This also strips off any newlines from the end of the line, to ease formatting of the text. Definition at line 93 of file SourceFile.cpp. |