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 ( ) inlineDefinition at line 187 of file SourceManager.h.
◆ ContentCache() [2/4] ◆ ContentCache() [3/4] ◆ ContentCache() [4/4] clang::SrcMgr::ContentCache::ContentCache ( const ContentCache & RHS ) inlineThe 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.
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 ( ) constReturns 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 ( ) constReturns 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 ( ) constReturns 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 ) inlineSet the buffer to one that's not owned (or to nullptr).
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::IsFileVolatileTrue 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 ◆ SourceLineCacheThe 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