A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://clang.llvm.org/doxygen/classclang_1_1SrcMgr_1_1ContentCache.html below:

clang: clang::SrcMgr::ContentCache Class Reference

One instance of this struct is kept for every file loaded or used. More...

#include "clang/Basic/SourceManager.h"

One instance of this struct is kept for every file loaded or used.

This object owns the MemoryBuffer object.

Definition at line 131 of file SourceManager.h.

◆ ContentCache() [1/4] clang::SrcMgr::ContentCache::ContentCache ( ) inline

Definition at line 187 of file SourceManager.h.

◆ ContentCache() [2/4] ◆ ContentCache() [3/4] ◆ ContentCache() [4/4] clang::SrcMgr::ContentCache::ContentCache ( const ContentCacheRHS ) inline

The copy ctor does not allow copies where source object has either a non-NULL Buffer or SourceLineCache.

Ownership of allocated memory is not transferred, so this is a logical error.

Definition at line 201 of file SourceManager.h.

References ContentsEntry, OrigEntry, and SourceLineCache.

◆ getBufferDataIfLoaded() std::optional< StringRef > clang::SrcMgr::ContentCache::getBufferDataIfLoaded ( ) const inline ◆ getBufferIfLoaded() std::optional< llvm::MemoryBufferRef > clang::SrcMgr::ContentCache::getBufferIfLoaded ( ) const inline ◆ getBufferOrNone()

Returns the memory buffer for the associated content.

Parameters
Diag Object through which diagnostics will be emitted if the buffer cannot be retrieved. Loc If specified, is the location that invalid file diagnostics will be emitted at.

Definition at line 111 of file SourceManager.cpp.

References ContentsEntry, Diag(), clang::FileManager::getBufferForFile(), getInvalidBOM(), clang::FileEntryRef::getName(), clang::FileEntryRef::getSize(), IsBufferInvalid, IsFileVolatile, clang::FileEntryRef::isNamedPipe(), and Loc.

Referenced by clang::SourceManager::createFileID(), clang::SourceManager::getBufferDataOrNone(), clang::SourceManager::getCharacterData(), clang::SourceManager::getLineNumber(), clang::SourceManager::getMemoryBufferForFileOrNone(), and clang::SourceManager::translateLineCol().

◆ getInvalidBOM() const char * ContentCache::getInvalidBOM ( StringRef  BufStr ) static ◆ getMemoryBufferKind() llvm::MemoryBuffer::BufferKind ContentCache::getMemoryBufferKind ( ) const

Returns the kind of memory used to back the memory buffer for this content cache.

This is used for performance analysis.

Definition at line 70 of file SourceManager.cpp.

◆ getSize() unsigned ContentCache::getSize ( ) const

Returns the size of the content encapsulated by this ContentCache.

getSize - Returns the size of the content encapsulated by this ContentCache.

This can be the size of the source file or the size of an arbitrary scratch buffer. If the ContentCache encapsulates a source file this size is retrieved from the file's FileEntry.

This can be the size of the source file or the size of an arbitrary scratch buffer. If the ContentCache encapsulates a source file, that file is not lazily brought in from disk to satisfy this query.

Definition at line 82 of file SourceManager.cpp.

References ContentsEntry, and clang::FileEntryRef::getSize().

◆ getSizeBytesMapped() unsigned ContentCache::getSizeBytesMapped ( ) const

Returns the number of bytes actually mapped for this ContentCache.

getSizeBytesMapped - Returns the number of bytes actually mapped for this ContentCache.

This can be 0 if the MemBuffer was not actually expanded.

Definition at line 64 of file SourceManager.cpp.

◆ operator=() ◆ setBuffer() void clang::SrcMgr::ContentCache::setBuffer ( std::unique_ptr< llvm::MemoryBuffer >  B ) inline ◆ setUnownedBuffer() void clang::SrcMgr::ContentCache::setUnownedBuffer ( std::optional< llvm::MemoryBufferRef >  B ) inline

Set the buffer to one that's not owned (or to nullptr).

Precondition
Buffer cannot already be set.

Definition at line 266 of file SourceManager.h.

References setBuffer().

◆ BufferOverridden unsigned clang::SrcMgr::ContentCache::BufferOverridden ◆ ContentsEntry ◆ Filename StringRef clang::SrcMgr::ContentCache::Filename ◆ IsBufferInvalid unsigned clang::SrcMgr::ContentCache::IsBufferInvalid mutable ◆ IsFileVolatile unsigned clang::SrcMgr::ContentCache::IsFileVolatile

True if this content cache was initially created for a source file considered to be volatile (likely to change between stat and open).

Definition at line 176 of file SourceManager.h.

Referenced by getBufferOrNone().

◆ IsTransient unsigned clang::SrcMgr::ContentCache::IsTransient ◆ OrigEntry ◆ SourceLineCache

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4