Home | History | Annotate | Download | only in Basic

Lines Matching refs:Entry

103   // exists. Most likely, we were using a stat cache with an invalid entry but
108 // currently handle returning a null entry here. Ideally we should detect
135 // Check that the file's size is the same as in the file entry (which may
218 /// presumed \#include stack. If it is 1, this is a file entry, if it is 2 then
253 /// FindNearestLineEntry - Find the line entry nearest to FID that is before
254 /// it. If there is no line entry before Offset in FID, return null.
272 /// \brief Add a new line entry that has already been encoded into
294 const SLocEntry &Entry = getSLocEntry(LocInfo.first, &Invalid);
295 if (!Entry.isFile() || Invalid)
298 const SrcMgr::FileInfo &FileInfo = Entry.getFile();
322 const SLocEntry &Entry = getSLocEntry(LocInfo.first, &Invalid);
323 if (!Entry.isFile() || Invalid)
326 const SrcMgr::FileInfo &FileInfo = Entry.getFile();
417 assert(FileEnt && "Didn't specify a file entry to use?");
420 ContentCache *&Entry = FileInfos[FileEnt];
421 if (Entry) return Entry;
423 // Nope, create a new Cache entry.
424 Entry = ContentCacheAlloc.Allocate<ContentCache>();
432 new (Entry
434 new (Entry) ContentCache(OverridenFilesKeepOriginalName ? FileEnt
438 new (Entry) ContentCache(FileEnt);
441 Entry->IsSystemFile = isSystemFile;
442 Entry->IsTransient = FilesAreTransient;
444 return Entry;
453 ContentCache *Entry = ContentCacheAlloc.Allocate<ContentCache>();
454 new (Entry) ContentCache();
455 MemBufferInfos.push_back(Entry);
456 Entry->setBuffer(std::move(Buffer));
457 return Entry;
709 /// still very important. It is responsible for finding the entry in the
770 // Convert "I" back into an index. We know that it is an entry whose index is
837 // Make sure the entry is loaded!
860 return FileID(); // invalid entry.
867 assert(0 && "binary search missed the entry");
884 assert(0 && "binary search missed the entry");
1108 const SLocEntry &Entry = getSLocEntry(LocInfo.first, &CharDataInvalid);
1109 if (CharDataInvalid || !Entry.isFile()) {
1115 llvm::MemoryBuffer *Buffer = Entry.getFile().getContentCache()->getBuffer(
1296 const SLocEntry &Entry = getSLocEntry(FID, &MyInvalid);
1297 if (MyInvalid || !Entry.isFile()) {
1303 Content = const_cast<ContentCache*>(Entry.getFile().getContentCache());
1421 const LineEntry *Entry =
1425 if (!Entry)
1428 return Entry->FileKind;
1457 const SLocEntry &Entry = getSLocEntry(LocInfo.first, &Invalid);
1458 if (Invalid || !Entry.isFile())
1461 const SrcMgr::FileInfo &FI = Entry.getFile();
1487 if (const LineEntry *Entry =
1490 if (Entry->FilenameID != -1)
1491 Filename = LineTable->getFilename(Entry->FilenameID);
1494 // be multiple lines down from the line entry. Add the difference in
1497 unsigned MarkerLineNo = getLineNumber(LocInfo.first, Entry->FileOffset);
1498 LineNo = Entry->LineNo + (LineNo-MarkerLineNo-1);
1503 if (Entry->IncludeOffset) {
1505 IncludeLoc = IncludeLoc.getLocWithOffset(Entry->IncludeOffset);
1527 const SLocEntry &Entry = getSLocEntry(LocInfo.first, &Invalid);
1528 if (Invalid || !Entry.isFile())
1531 const SrcMgr::FileInfo &FI = Entry.getFile();
1535 if (const LineEntry *Entry =
1537 if (Entry->IncludeOffset)
1546 const SrcMgr::SLocEntry &Entry = getSLocEntry(FID, &Invalid);
1559 return NextOffset - Entry.getOffset() - 1;
1566 /// \brief Retrieve the inode for the given file entry, if possible.
1692 const FileEntry *Entry = FileContentCache ? FileContentCache->OrigEntry
1694 if (Entry &&
1695 *SourceFileName == llvm::sys::path::filename(Entry->getName())) {
1697 getActualFileUID(Entry)) {
1700 SourceFile = Entry;
1726 const SLocEntry &Entry = getSLocEntry(FID, &Invalid);
1730 if (!Entry.isFile())
1733 SourceLocation FileLoc = SourceLocation::getFileLoc(Entry.getOffset());
1739 = const_cast<ContentCache *>(Entry.getFile().getContentCache());
1803 const SrcMgr::SLocEntry &Entry = getSLocEntryByID(ID, &Invalid);
1806 if (Entry.isFile()) {
1807 SourceLocation IncludeLoc = Entry.getFile().getIncludeLoc();
1815 if (Entry.getFile().NumCreatedFIDs)
1816 ID += Entry.getFile().NumCreatedFIDs - 1/*because of next ++ID*/;
1820 const ExpansionInfo &ExpInfo = Entry.getExpansion();
1832 SourceLocation::getMacroLoc(Entry.getOffset()),
1848 // consecutive FileID entries. Go through each entry contained in the
1856 const SLocEntry &Entry = getSLocEntry(SpellFID);
1857 unsigned SpellFIDBeginOffs = Entry.getOffset();
1860 const ExpansionInfo &Info = Entry.getExpansion();
1875 // Move to the next FileID entry in the spelling range.
1970 const SrcMgr::SLocEntry &Entry = getSLocEntry(FID, &Invalid);
1972 if (Entry.isExpansion())
1973 UpperLoc = Entry.getExpansion().getExpansionLocStart();
1975 UpperLoc = Entry.getFile().getIncludeLoc();
1987 /// entry, return true and don't modify it.
1998 /// Return the cache entry for comparing the given file IDs
2009 // construct an entry. We can then return it to the caller for direct
2147 auto DumpSLocEntry = [&](int ID, const SrcMgr::SLocEntry &Entry,
2149 out << "SLocEntry <FileID " << ID << "> " << (Entry.isFile() ? "file" : "expansion")
2150 << " <SourceLocation " << Entry.getOffset() << ":";
2155 if (Entry.isFile()) {
2156 auto &FI = Entry.getFile();
2174 auto &EI = Entry.getExpansion();