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(
1302 const SLocEntry &Entry = getSLocEntry(FID, &MyInvalid);
1303 if (MyInvalid || !Entry.isFile()) {
1309 Content = const_cast<ContentCache*>(Entry.getFile().getContentCache());
1428 const LineEntry *Entry =
1432 if (!Entry)
1435 return Entry->FileKind;
1464 const SLocEntry &Entry = getSLocEntry(LocInfo.first, &Invalid);
1465 if (Invalid || !Entry.isFile())
1468 const SrcMgr::FileInfo &FI = Entry.getFile();
1494 if (const LineEntry *Entry =
1497 if (Entry->FilenameID != -1)
1498 Filename = LineTable->getFilename(Entry->FilenameID);
1501 // be multiple lines down from the line entry. Add the difference in
1504 unsigned MarkerLineNo = getLineNumber(LocInfo.first, Entry->FileOffset);
1505 LineNo = Entry->LineNo + (LineNo-MarkerLineNo-1);
1510 if (Entry->IncludeOffset) {
1512 IncludeLoc = IncludeLoc.getLocWithOffset(Entry->IncludeOffset);
1534 const SLocEntry &Entry = getSLocEntry(LocInfo.first, &Invalid);
1535 if (Invalid || !Entry.isFile())
1538 const SrcMgr::FileInfo &FI = Entry.getFile();
1542 if (const LineEntry *Entry =
1544 if (Entry->IncludeOffset)
1553 const SrcMgr::SLocEntry &Entry = getSLocEntry(FID, &Invalid);
1566 return NextOffset - Entry.getOffset() - 1;
1573 /// \brief Retrieve the inode for the given file entry, if possible.
1699 const FileEntry *Entry = FileContentCache ? FileContentCache->OrigEntry
1701 if (Entry &&
1702 *SourceFileName == llvm::sys::path::filename(Entry->getName())) {
1704 getActualFileUID(Entry)) {
1707 SourceFile = Entry;
1733 const SLocEntry &Entry = getSLocEntry(FID, &Invalid);
1737 if (!Entry.isFile())
1740 SourceLocation FileLoc = SourceLocation::getFileLoc(Entry.getOffset());
1746 = const_cast<ContentCache *>(Entry.getFile().getContentCache());
1810 const SrcMgr::SLocEntry &Entry = getSLocEntryByID(ID, &Invalid);
1813 if (Entry.isFile()) {
1814 SourceLocation IncludeLoc = Entry.getFile().getIncludeLoc();
1822 if (Entry.getFile().NumCreatedFIDs)
1823 ID += Entry.getFile().NumCreatedFIDs - 1/*because of next ++ID*/;
1827 const ExpansionInfo &ExpInfo = Entry.getExpansion();
1839 SourceLocation::getMacroLoc(Entry.getOffset()),
1855 // consecutive FileID entries. Go through each entry contained in the
1863 const SLocEntry &Entry = getSLocEntry(SpellFID);
1864 unsigned SpellFIDBeginOffs = Entry.getOffset();
1867 const ExpansionInfo &Info = Entry.getExpansion();
1882 // Move to the next FileID entry in the spelling range.
1977 const SrcMgr::SLocEntry &Entry = getSLocEntry(FID, &Invalid);
1979 if (Entry.isExpansion())
1980 UpperLoc = Entry.getExpansion().getExpansionLocStart();
1982 UpperLoc = Entry.getFile().getIncludeLoc();
1994 /// entry, return true and don't modify it.
2005 /// Return the cache entry for comparing the given file IDs
2016 // construct an entry. We can then return it to the caller for direct
2162 auto DumpSLocEntry = [&](int ID, const SrcMgr::SLocEntry &Entry,
2164 out << "SLocEntry <FileID " << ID << "> " << (Entry.isFile() ? "file" : "expansion")
2165 << " <SourceLocation " << Entry.getOffset() << ":";
2170 if (Entry.isFile()) {
2171 auto &FI = Entry.getFile();
2189 auto &EI = Entry.getExpansion();