Lines Matching refs:FileID

197 void LineTableInfo::AddLineNote(FileID FID, unsigned Offset,
228 void LineTableInfo::AddLineNote(FileID FID, unsigned Offset,
262 const LineEntry *LineTableInfo::FindNearestLineEntry(FileID FID,
281 void LineTableInfo::AddEntry(FileID FID,
295 /// AddLineNote - Add a line note to the line table for the FileID and offset
300 std::pair<FileID, unsigned> LocInfo = getDecomposedExpansionLoc(Loc);
330 std::pair<FileID, unsigned> LocInfo = getDecomposedExpansionLoc(Loc);
407 for (llvm::DenseMap<FileID, MacroArgsMap *>::iterator
414 MainFileID = FileID();
418 LastLineNoFileIDQuery = FileID();
420 LastFileIDLookup = FileID();
425 // Use up FileID #0 as an invalid expansion.
539 /// \brief Returns the previous in-order FileID or an invalid FileID if there
541 FileID SourceManager::getPreviousFileID(FileID FID) const {
543 return FileID();
547 return FileID();
551 return FileID();
553 return FileID();
556 return FileID::get(ID-1);
559 /// \brief Returns the next in-order FileID or an invalid FileID if there is
561 FileID SourceManager::getNextFileID(FileID FID) const {
563 return FileID();
568 return FileID();
570 return FileID();
573 return FileID::get(ID+1);
577 // Methods to create new FileID's and macro expansions.
580 /// createFileID - Create a new FileID for the specified ContentCache and
583 FileID SourceManager::createFileID(const ContentCache *File,
588 assert(LoadedID != -1 && "Loading sentinel FileID");
590 assert(Index < LoadedSLocEntryTable.size() && "FileID out of range");
591 assert(!SLocEntryLoaded[Index] && "FileID already loaded");
595 return FileID::get(LoadedID);
610 FileID FID = FileID::get(LocalSLocEntryTable.size()-1);
641 assert(LoadedID != -1 && "Loading sentinel FileID");
643 assert(Index < LoadedSLocEntryTable.size() && "FileID out of range");
644 assert(!SLocEntryLoaded[Index] && "FileID already loaded");
702 StringRef SourceManager::getBufferData(FileID FID, bool *Invalid) const {
727 /// \brief Return the FileID for a SourceLocation.
732 FileID SourceManager::getFileIDSlow(unsigned SLocOffset) const {
734 return FileID::get(0);
743 /// \brief Return the FileID for a SourceLocation with a low offset.
747 FileID SourceManager::getFileIDLocal(unsigned SLocOffset) const {
751 // behavior: 1) a lot of searched FileID's are "near" the cached file
760 // most newly created FileID.
772 // Find the FileID that contains this. "I" is an iterator that points to a
773 // FileID whose offset is known to be larger than SLocOffset.
778 FileID Res = FileID::get(int(I - LocalSLocEntryTable.begin()));
781 // FileID lookups.
795 // We know that the offset corresponding to the FileID is is less than
804 return FileID::get(0);
818 if (isOffsetInFileID(FileID::get(MiddleIndex), SLocOffset)) {
819 FileID Res = FileID::get(MiddleIndex);
822 // across FileID lookups.
834 /// \brief Return the FileID for a SourceLocation with a high offset.
838 FileID SourceManager::getFileIDLoaded(unsigned SLocOffset) const {
842 return FileID();
861 FileID Res = FileID::get(-int(I) - 2);
881 return FileID(); // invalid entry.
889 return FileID();
895 if (isOffsetInFileID(FileID::get(-int(MiddleIndex) - 2), SLocOffset)) {
896 FileID Res = FileID::get(-int(MiddleIndex) - 2);
906 return FileID();
929 std::pair<FileID, unsigned> LocInfo = getDecomposedLoc(Loc);
947 std::pair<FileID, unsigned>
951 FileID FID;
965 std::pair<FileID, unsigned>
969 FileID FID;
989 std::pair<FileID, unsigned> LocInfo = getDecomposedLoc(Loc);
1025 FileID FID = getFileID(Loc);
1033 FileID FID = getFileID(Loc);
1042 std::pair<FileID, unsigned> DecompLoc = getDecomposedLoc(Loc);
1054 // For macro argument expansions, check if the previous FileID is part of
1057 FileID PrevFID = getPreviousFileID(DecompLoc.first);
1077 FileID FID = getFileID(Loc);
1089 // For macro argument expansions, check if the next FileID is part of the
1092 FileID NextFID = getNextFileID(FID);
1120 std::pair<FileID, unsigned> LocInfo = getDecomposedSpellingLoc(SL);
1142 unsigned SourceManager::getColumnNumber(FileID FID, unsigned FilePos,
1190 std::pair<FileID, unsigned> LocInfo = getDecomposedSpellingLoc(Loc);
1197 std::pair<FileID, unsigned> LocInfo = getDecomposedExpansionLoc(Loc);
1301 unsigned SourceManager::getLineNumber(FileID FID, unsigned FilePos,
1423 std::pair<FileID, unsigned> LocInfo = getDecomposedSpellingLoc(Loc);
1429 std::pair<FileID, unsigned> LocInfo = getDecomposedExpansionLoc(Loc);
1449 std::pair<FileID, unsigned> LocInfo = getDecomposedExpansionLoc(Loc);
1497 std::pair<FileID, unsigned> LocInfo = getDecomposedExpansionLoc(Loc);
1567 std::pair<FileID, unsigned> LocInfo = getDecomposedExpansionLoc(Loc);
1587 unsigned SourceManager::getFileIDSize(FileID FID) const {
1600 NextOffset = getSLocEntry(FileID::get(ID+1)).getOffset();
1635 FileID FirstFID = translateFile(SourceFile);
1639 /// \brief Get the FileID for the given file.
1641 /// If the source file is included multiple times, the FileID will be the
1643 FileID SourceManager::translateFile(const FileEntry *SourceFile) const {
1647 FileID FirstFID;
1657 return FileID();
1694 return FileID();
1699 FirstFID = FileID::get(I);
1710 FirstFID = FileID::get(-int(I) - 2);
1726 FileID IFileID;
1730 return FileID();
1741 FirstFID = FileID::get(I);
1757 SourceLocation SourceManager::translateLineCol(FileID FID,
1824 FileID FID) const {
1875 getFileIDSize(FileID::get(ID)));
1881 FileID FID,
1890 // consecutive FileID entries. Go through each entry contained in the
1894 FileID SpellFID; // Current FileID in the spelling range.
1915 return; // we covered all FileID entries in the spelling range.
1917 // Move to the next FileID entry in the spelling range.
1940 // and we found a new macro FileID that lexed from offet 105 with length 3,
1973 FileID FID;
1995 std::pair<FileID, unsigned>
1996 SourceManager::getDecomposedIncludedLoc(FileID FID) const {
1998 return std::make_pair(FileID(), 0);
2002 typedef std::pair<FileID, unsigned> DecompTy;
2003 typedef llvm::DenseMap<FileID, DecompTy> MapTy;
2030 static bool MoveUpIncludeHierarchy(std::pair<FileID, unsigned> &Loc,
2032 std::pair<FileID, unsigned> UpperLoc = SM.getDecomposedIncludedLoc(Loc.first);
2042 InBeforeInTUCacheEntry &SourceManager::getInBeforeInTUCache(FileID LFID,
2043 FileID RFID) const {
2075 std::pair<FileID, unsigned> LOffs = getDecomposedLoc(LHS);
2076 std::pair<FileID, unsigned> ROffs = getDecomposedLoc(RHS);
2078 // getDecomposedLoc may have failed to return a valid FileID because, e.g. it
2105 // We use a map from FileID to Offset to store the chain. Easier than writing
2107 typedef llvm::SmallDenseMap<FileID, unsigned, 16> LocSet;
2171 llvm::errs() << "FileID scans: " << NumLinearScans << " linear, "