clang 20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
clang::SrcMgr::LineOffsetMapping Class Reference

Mapping of line offsets into a source file. More...

#include "clang/Basic/SourceManager.h"

Public Member Functions

 operator bool () const
 
unsigned size () const
 
ArrayRef< unsignedgetLines () const
 
const unsignedbegin () const
 
const unsignedend () const
 
const unsignedoperator[] (int I) const
 
 LineOffsetMapping ()=default
 
 LineOffsetMapping (ArrayRef< unsigned > LineOffsets, llvm::BumpPtrAllocator &Alloc)
 

Static Public Member Functions

static LineOffsetMapping get (llvm::MemoryBufferRef Buffer, llvm::BumpPtrAllocator &Alloc)
 

Detailed Description

Mapping of line offsets into a source file.

This does not own the storage for the line numbers.

Definition at line 101 of file SourceManager.h.

Constructor & Destructor Documentation

◆ LineOffsetMapping() [1/2]

clang::SrcMgr::LineOffsetMapping::LineOffsetMapping ( )
default

◆ LineOffsetMapping() [2/2]

LineOffsetMapping::LineOffsetMapping ( ArrayRef< unsigned LineOffsets,
llvm::BumpPtrAllocator &  Alloc 
)

Definition at line 1289 of file SourceManager.cpp.

Member Function Documentation

◆ begin()

const unsigned * clang::SrcMgr::LineOffsetMapping::begin ( ) const
inline

◆ end()

const unsigned * clang::SrcMgr::LineOffsetMapping::end ( ) const
inline

Definition at line 113 of file SourceManager.h.

References getLines().

Referenced by clang::SourceManager::getLineNumber().

◆ get()

LineOffsetMapping LineOffsetMapping::get ( llvm::MemoryBufferRef  Buffer,
llvm::BumpPtrAllocator &  Alloc 
)
static

◆ getLines()

ArrayRef< unsigned > clang::SrcMgr::LineOffsetMapping::getLines ( ) const
inline

Definition at line 108 of file SourceManager.h.

References size().

Referenced by begin(), end(), and operator[]().

◆ operator bool()

clang::SrcMgr::LineOffsetMapping::operator bool ( ) const
inlineexplicit

Definition at line 103 of file SourceManager.h.

◆ operator[]()

const unsigned & clang::SrcMgr::LineOffsetMapping::operator[] ( int  I) const
inline

Definition at line 114 of file SourceManager.h.

References getLines().

◆ size()

unsigned clang::SrcMgr::LineOffsetMapping::size ( ) const
inline

The documentation for this class was generated from the following files: