struct SourceMgr::SrcBuffer

Declaration

struct SourceMgr::SrcBuffer { /* full declaration omitted */ };

Declared at: llvm/include/llvm/Support/SourceMgr.h:46

Member Variables

public std::unique_ptr<MemoryBuffer> Buffer
The memory buffer for the file.
public void* OffsetCache = nullptr
Since we're storing offsets into relatively small files (often smaller than 2^8 or 2^16 bytes), we select the offset vector element type dynamically based on the size of Buffer.
public llvm::SMLoc IncludeLoc
This is the location of the parent include, or null if at the top level.

Method Overview

Methods

SrcBuffer()

Declared at: llvm/include/llvm/Support/SourceMgr.h:77

SrcBuffer(llvm::SourceMgr::SrcBuffer&&)

Declared at: llvm/include/llvm/Support/SourceMgr.h:78

Parameters

llvm::SourceMgr::SrcBuffer&&

SrcBuffer(const llvm::SourceMgr::SrcBuffer&)

Declared at: llvm/include/llvm/Support/SourceMgr.h:79

Parameters

const llvm::SourceMgr::SrcBuffer&

unsigned int getLineNumber(const char* Ptr) const

Description

Look up a given \p Ptr in in the buffer, determining which line it came from.

Declared at: llvm/include/llvm/Support/SourceMgr.h:64

Parameters

const char* Ptr

template <typename T>
unsigned int getLineNumberSpecialized(
    const char* Ptr) const

Declared at: llvm/include/llvm/Support/SourceMgr.h:66

Templates

T

Parameters

const char* Ptr

const char* getPointerForLineNumber(
    unsigned int LineNo) const

Description

Return a pointer to the first character of the specified line number or null if the line number is invalid.

Declared at: llvm/include/llvm/Support/SourceMgr.h:70

Parameters

unsigned int LineNo

template <typename T>
const char* getPointerForLineNumberSpecialized(
    unsigned int LineNo) const

Declared at: llvm/include/llvm/Support/SourceMgr.h:72

Templates

T

Parameters

unsigned int LineNo

~SrcBuffer()

Declared at: llvm/include/llvm/Support/SourceMgr.h:81