Home | History | Annotate | Download | only in Basic

Lines Matching refs:FileID

190 void LineTableInfo::AddLineNote(FileID FID, unsigned Offset,
221 void LineTableInfo::AddLineNote(FileID FID, unsigned Offset,
255 const LineEntry *LineTableInfo::FindNearestLineEntry(FileID FID,
274 void LineTableInfo::AddEntry(FileID FID,
288 /// AddLineNote - Add a line note to the line table for the FileID and offset
293 std::pair<FileID, unsigned> LocInfo = getDecomposedExpansionLoc(Loc);
323 std::pair<FileID, unsigned> LocInfo = getDecomposedExpansionLoc(Loc);
400 MainFileID = FileID();
404 LastLineNoFileIDQuery = FileID();
406 LastFileIDLookup = FileID();
411 // Use up FileID #0 as an invalid expansion.
517 /// \brief Returns the previous in-order FileID or an invalid FileID if there
519 FileID SourceManager::getPreviousFileID(FileID FID) const {
521 return FileID();
525 return FileID();
529 return FileID();
531 return FileID();
534 return FileID::get(ID-1);
537 /// \brief Returns the next in-order FileID or an invalid FileID if there is
539 FileID SourceManager::getNextFileID(FileID FID) const {
541 return FileID();
546 return FileID();
548 return FileID();
551 return FileID::get(ID+1);
555 // Methods to create new FileID's and macro expansions.
558 /// createFileID - Create a new FileID for the specified ContentCache and
561 FileID SourceManager::createFileID(const ContentCache *File,
566 assert(LoadedID != -1 && "Loading sentinel FileID");
568 assert(Index < LoadedSLocEntryTable.size() && "FileID out of range");
569 assert(!SLocEntryLoaded[Index] && "FileID already loaded");
573 return FileID::get(LoadedID);
588 FileID FID = FileID::get(LocalSLocEntryTable.size()-1);
619 assert(LoadedID != -1 && "Loading sentinel FileID");
621 assert(Index < LoadedSLocEntryTable.size() && "FileID out of range");
622 assert(!SLocEntryLoaded[Index] && "FileID already loaded");
679 StringRef SourceManager::getBufferData(FileID FID, bool *Invalid) const {
703 /// \brief Return the FileID for a SourceLocation.
708 FileID SourceManager::getFileIDSlow(unsigned SLocOffset) const {
710 return FileID::get(0);
719 /// \brief Return the FileID for a SourceLocation with a low offset.
723 FileID SourceManager::getFileIDLocal(unsigned SLocOffset) const {
727 // behavior: 1) a lot of searched FileID's are "near" the cached file
736 // most newly created FileID.
748 // Find the FileID that contains this. "I" is an iterator that points to a
749 // FileID whose offset is known to be larger than SLocOffset.
754 FileID Res = FileID::get(int(I - LocalSLocEntryTable.begin()));
757 // FileID lookups.
771 // We know that the offset corresponding to the FileID is is less than
780 return FileID::get(0);
794 if (isOffsetInFileID(FileID::get(MiddleIndex), SLocOffset)) {
795 FileID Res = FileID::get(MiddleIndex);
798 // across FileID lookups.
810 /// \brief Return the FileID for a SourceLocation with a high offset.
814 FileID SourceManager::getFileIDLoaded(unsigned SLocOffset) const {
818 return FileID();
837 FileID Res = FileID::get(-int(I) - 2);
857 return FileID(); // invalid entry.
865 return FileID();
871 if (isOffsetInFileID(FileID::get(-int(MiddleIndex) - 2), SLocOffset)) {
872 FileID Res = FileID::get(-int(MiddleIndex) - 2);
882 return FileID();
905 std::pair<FileID, unsigned> LocInfo = getDecomposedLoc(Loc);
923 std::pair<FileID, unsigned>
927 FileID FID;
941 std::pair<FileID, unsigned>
945 FileID FID;
965 std::pair<FileID, unsigned> LocInfo = getDecomposedLoc(Loc);
1001 FileID FID = getFileID(Loc);
1009 FileID FID = getFileID(Loc);
1018 std::pair<FileID, unsigned> DecompLoc = getDecomposedLoc(Loc);
1030 // For macro argument expansions, check if the previous FileID is part of
1033 FileID PrevFID = getPreviousFileID(DecompLoc.first);
1053 FileID FID = getFileID(Loc);
1065 // For macro argument expansions, check if the next FileID is part of the
1068 FileID NextFID = getNextFileID(FID);
1096 std::pair<FileID, unsigned> LocInfo = getDecomposedSpellingLoc(SL);
1117 unsigned SourceManager::getColumnNumber(FileID FID, unsigned FilePos,
1165 std::pair<FileID, unsigned> LocInfo = getDecomposedSpellingLoc(Loc);
1172 std::pair<FileID, unsigned> LocInfo = getDecomposedExpansionLoc(Loc);
1275 unsigned SourceManager::getLineNumber(FileID FID, unsigned FilePos,
1372 std::pair<FileID, unsigned> LocInfo = getDecomposedSpellingLoc(Loc);
1378 std::pair<FileID, unsigned> LocInfo = getDecomposedExpansionLoc(Loc);
1398 std::pair<FileID, unsigned> LocInfo = getDecomposedExpansionLoc(Loc);
1446 std::pair<FileID, unsigned> LocInfo = getDecomposedExpansionLoc(Loc);
1516 std::pair<FileID, unsigned> LocInfo = getDecomposedExpansionLoc(Loc);
1536 unsigned SourceManager::getFileIDSize(FileID FID) const {
1549 NextOffset = getSLocEntry(FileID::get(ID+1)).getOffset();
1584 FileID FirstFID = translateFile(SourceFile);
1588 /// \brief Get the FileID for the given file.
1590 /// If the source file is included multiple times, the FileID will be the
1592 FileID SourceManager::translateFile(const FileEntry *SourceFile) const {
1596 FileID FirstFID;
1606 return FileID();
1643 return FileID();
1648 FirstFID = FileID::get(I);
1659 FirstFID = FileID::get(-int(I) - 2);
1675 FileID IFileID;
1679 return FileID();
1691 FirstFID = FileID::get(I);
1707 SourceLocation SourceManager::translateLineCol(FileID FID,
1774 FileID FID) const {
1825 getFileIDSize(FileID::get(ID)));
1831 FileID FID,
1840 // consecutive FileID entries. Go through each entry contained in the
1844 FileID SpellFID; // Current FileID in the spelling range.
1865 return; // we covered all FileID entries in the spelling range.
1867 // Move to the next FileID entry in the spelling range.
1890 // and we found a new macro FileID that lexed from offet 105 with length 3,
1923 FileID FID;
1945 std::pair<FileID, unsigned>
1946 SourceManager::getDecomposedIncludedLoc(FileID FID) const {
1948 return std::make_pair(FileID(), 0);
1952 typedef std::pair<FileID, unsigned> DecompTy;
1953 typedef llvm::DenseMap<FileID, DecompTy> MapTy;
1980 static bool MoveUpIncludeHierarchy(std::pair<FileID, unsigned> &Loc,
1982 std::pair<FileID, unsigned> UpperLoc = SM.getDecomposedIncludedLoc(Loc.first);
1992 InBeforeInTUCacheEntry &SourceManager::getInBeforeInTUCache(FileID LFID,
1993 FileID RFID) const {
2025 std::pair<FileID, unsigned> LOffs = getDecomposedLoc(LHS);
2026 std::pair<FileID, unsigned> ROffs = getDecomposedLoc(RHS);
2028 // getDecomposedLoc may have failed to return a valid FileID because, e.g. it
2055 // We use a map from FileID to Offset to store the chain. Easier than writing
2057 typedef llvm::SmallDenseMap<FileID, unsigned, 16> LocSet;
2132 llvm::errs() << "FileID scans: " << NumLinearScans << " linear, "