Lines Matching defs:ContentCache

38 ContentCache::~ContentCache() {
44 /// ContentCache. This can be 0 if the MemBuffer was not actually expanded.
45 unsigned ContentCache::getSizeBytesMapped() const {
51 llvm::MemoryBuffer::BufferKind ContentCache::getMemoryBufferKind() const {
62 /// getSize - Returns the size of the content encapsulated by this ContentCache.
64 /// scratch buffer. If the ContentCache encapsulates a source file, that
66 unsigned ContentCache::getSize() const {
71 void ContentCache::replaceBuffer(llvm::MemoryBuffer *B, bool DoNotFree) {
84 llvm::MemoryBuffer *ContentCache::getBuffer(DiagnosticsEngine &Diag,
379 MemBufferInfos[i]->~ContentCache();
383 for (llvm::DenseMap<const FileEntry*, SrcMgr::ContentCache*>::iterator
386 I->second->~ContentCache();
412 /// getOrCreateContentCache - Create or return a cached ContentCache for the
414 const ContentCache *
420 ContentCache *&Entry = FileInfos[FileEnt];
424 Entry = ContentCacheAlloc.Allocate<ContentCache>();
428 // pass that file to ContentCache.
432 new (Entry) ContentCache(FileEnt);
434 new (Entry) ContentCache(OverridenFilesKeepOriginalName ? FileEnt
438 new (Entry) ContentCache(FileEnt);
448 /// createMemBufferContentCache - Create a new ContentCache for the specified
450 const ContentCache *SourceManager::createMemBufferContentCache(
452 // Add a new ContentCache to the MemBufferInfos list and return it.
453 ContentCache *Entry = ContentCacheAlloc.Allocate<ContentCache>();
454 new (Entry) ContentCache();
505 const SrcMgr::ContentCache *
508 FakeContentCacheForRecovery = llvm::make_unique<SrcMgr::ContentCache>();
556 /// createFileID - Create a new FileID for the specified ContentCache and
557 /// include position. This works regardless of whether the ContentCache
559 FileID SourceManager::createFileID(const ContentCache *File,
636 const SrcMgr::ContentCache *IR = getOrCreateContentCache(File);
644 const SrcMgr::ContentCache *IR = getOrCreateContentCache(SourceFile);
647 const_cast<SrcMgr::ContentCache *>(IR)->replaceBuffer(Buffer, DoNotFree);
648 const_cast<SrcMgr::ContentCache *>(IR)->BufferOverridden = true;
668 const SrcMgr::ContentCache *IR = getOrCreateContentCache(File);
669 const_cast<SrcMgr::ContentCache *>(IR)->replaceBuffer(nullptr);
670 const_cast<SrcMgr::ContentCache *>(IR)->ContentsEntry = IR->OrigEntry;
678 const SrcMgr::ContentCache *CC = getOrCreateContentCache(File);
679 const_cast<SrcMgr::ContentCache *>(CC)->IsTransient = true;
1195 ComputeLineNumbers(DiagnosticsEngine &Diag, ContentCache *FI,
1198 static void ComputeLineNumbers(DiagnosticsEngine &Diag, ContentCache *FI,
1291 ContentCache *Content;
1303 Content = const_cast<ContentCache*>(Entry.getFile().getContentCache());
1462 const SrcMgr::ContentCache *C = FI.getContentCache();
1617 const ContentCache *MainContentCache
1690 const ContentCache *FileContentCache
1738 ContentCache *Content
1739 = const_cast<ContentCache *>(Entry.getFile().getContentCache());