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,
390 MemBufferInfos[i]->~ContentCache();
394 for (llvm::DenseMap<const FileEntry*, SrcMgr::ContentCache*>::iterator
397 I->second->~ContentCache();
426 /// getOrCreateContentCache - Create or return a cached ContentCache for the
428 const ContentCache *
434 ContentCache *&Entry = FileInfos[FileEnt];
438 Entry = ContentCacheAlloc.Allocate<ContentCache>();
442 // pass that file to ContentCache.
446 new (Entry) ContentCache(FileEnt);
448 new (Entry) ContentCache(OverridenFilesKeepOriginalName ? FileEnt
452 new (Entry) ContentCache(FileEnt);
461 /// createMemBufferContentCache - Create a new ContentCache for the specified
463 const ContentCache *
465 // Add a new ContentCache to the MemBufferInfos list and return it.
466 ContentCache *Entry = ContentCacheAlloc.Allocate<ContentCache>();
467 new (Entry) ContentCache();
516 const SrcMgr::ContentCache *
519 FakeContentCacheForRecovery = new ContentCache();
567 /// createFileID - Create a new FileID for the specified ContentCache and
568 /// include position. This works regardless of whether the ContentCache
570 FileID SourceManager::createFileID(const ContentCache *File,
647 const SrcMgr::ContentCache *IR = getOrCreateContentCache(File);
655 const SrcMgr::ContentCache *IR = getOrCreateContentCache(SourceFile);
658 const_cast<SrcMgr::ContentCache *>(IR)->replaceBuffer(Buffer, DoNotFree);
659 const_cast<SrcMgr::ContentCache *>(IR)->BufferOverridden = true;
679 const SrcMgr::ContentCache *IR = getOrCreateContentCache(File);
680 const_cast<SrcMgr::ContentCache *>(IR)->replaceBuffer(nullptr);
681 const_cast<SrcMgr::ContentCache *>(IR)->ContentsEntry = IR->OrigEntry;
1196 ComputeLineNumbers(DiagnosticsEngine &Diag, ContentCache *FI,
1199 static void ComputeLineNumbers(DiagnosticsEngine &Diag, ContentCache *FI,
1292 ContentCache *Content;
1304 Content = const_cast<ContentCache*>(Entry.getFile().getContentCache());
1463 const SrcMgr::ContentCache *C = FI.getContentCache();
1618 const ContentCache *MainContentCache
1691 const ContentCache *FileContentCache
1739 ContentCache *Content
1740 = const_cast<ContentCache *>(Entry.getFile().getContentCache());