class LineOffsetMapping
Declaration
class LineOffsetMapping { /* full declaration omitted */ };
Description
Mapping of line offsets into a source file. This does not own the storage for the line numbers.
Declared at: clang/include/clang/Basic/SourceManager.h:99
Member Variables
- private unsigned int* Storage = nullptr
- First element is the size, followed by elements at off-by-one indexes.
Method Overview
- public LineOffsetMapping()
- public LineOffsetMapping(ArrayRef<unsigned int> LineOffsets, llvm::BumpPtrAllocator & Alloc)
- public const unsigned int * begin() const
- public const unsigned int * end() const
- public static clang::SrcMgr::LineOffsetMapping get(llvm::MemoryBufferRef Buffer, llvm::BumpPtrAllocator & Alloc)
- public ArrayRef<unsigned int> getLines() const
- public bool operator bool() const
- public unsigned int size() const
Methods
¶LineOffsetMapping()
LineOffsetMapping()
Declared at: clang/include/clang/Basic/SourceManager.h:117
¶LineOffsetMapping(
ArrayRef<unsigned int> LineOffsets,
llvm::BumpPtrAllocator& Alloc)
LineOffsetMapping(
ArrayRef<unsigned int> LineOffsets,
llvm::BumpPtrAllocator& Alloc)
Declared at: clang/include/clang/Basic/SourceManager.h:118
Parameters
- ArrayRef<unsigned int> LineOffsets
- llvm::BumpPtrAllocator& Alloc
¶const unsigned int* begin() const
const unsigned int* begin() const
Declared at: clang/include/clang/Basic/SourceManager.h:110
¶const unsigned int* end() const
const unsigned int* end() const
Declared at: clang/include/clang/Basic/SourceManager.h:111
¶static clang::SrcMgr::LineOffsetMapping get(
llvm::MemoryBufferRef Buffer,
llvm::BumpPtrAllocator& Alloc)
static clang::SrcMgr::LineOffsetMapping get(
llvm::MemoryBufferRef Buffer,
llvm::BumpPtrAllocator& Alloc)
Declared at: clang/include/clang/Basic/SourceManager.h:114
Parameters
- llvm::MemoryBufferRef Buffer
- llvm::BumpPtrAllocator& Alloc
¶ArrayRef<unsigned int> getLines() const
ArrayRef<unsigned int> getLines() const
Declared at: clang/include/clang/Basic/SourceManager.h:106
¶bool operator bool() const
bool operator bool() const
Declared at: clang/include/clang/Basic/SourceManager.h:101
¶unsigned int size() const
unsigned int size() const
Declared at: clang/include/clang/Basic/SourceManager.h:102