Lines Matching refs:FileID
228 /// \brief Information about a FileID, basically just the logical file
283 /// \brief Return true if this FileID has \#line directives in it.
286 /// \brief Set the flag that indicates that this FileID has
389 /// identified by the FileID datatype.
452 /// \brief The FileID's of the cached query.
455 FileID LQueryFID, RQueryFID;
464 FileID CommonFID;
477 bool isCacheValid(FileID LHS, FileID RHS) const {
482 /// specified offsets in the LHS/RHS FileID's.
493 // in which case its FileID will come before the other.
501 void setQueryFIDs(FileID LHS, FileID RHS, bool isLFIDBeforeRFID) {
509 LQueryFID = RQueryFID = FileID();
513 void setCommonLoc(FileID commonFID, unsigned lCommonOffset,
530 /// files and assigns unique FileID's for each unique \#include chain.
625 /// LastFileIDLookup records the last FileID looked up or created, because it
627 mutable FileID LastFileIDLookup;
636 mutable FileID LastLineNoFileIDQuery;
642 FileID MainFileID;
645 FileID PreambleFileID;
650 /// \brief Associates a FileID with its "included/expanded in" decomposed
655 mutable llvm::DenseMap<FileID, std::pair<FileID, unsigned> > IncludedLocMap;
658 typedef std::pair<FileID, FileID> IsBeforeInTUCacheKey;
660 /// The IsBeforeInTranslationUnitCache is a mapping from FileID pairs
671 InBeforeInTUCacheEntry &getInBeforeInTUCache(FileID LFID, FileID RFID) const;
682 mutable llvm::DenseMap<FileID, MacroArgsMap *> MacroArgsCacheMap;
738 /// \brief Returns the FileID of the main source file.
739 FileID getMainFileID() const { return MainFileID; }
742 void setMainFileID(FileID FID) {
747 void setPreambleFileID(FileID Preamble) {
753 FileID getPreambleFileID() const { return PreambleFileID; }
756 // Methods to create new FileID's and macro expansions.
759 /// \brief Create a new FileID that represents the specified file
763 FileID createFileID(const FileEntry *SourceFile, SourceLocation IncludePos,
773 /// \brief Create a new FileID that represents the specified memory buffer.
777 FileID createFileID(std::unique_ptr<llvm::MemoryBuffer> Buffer,
855 // FileID manipulation methods.
858 /// \brief Return the buffer for the specified FileID.
862 llvm::MemoryBuffer *getBuffer(FileID FID, SourceLocation Loc,
877 llvm::MemoryBuffer *getBuffer(FileID FID, bool *Invalid = nullptr) const {
892 /// \brief Returns the FileEntry record for the provided FileID.
893 const FileEntry *getFileEntryForID(FileID FID) const {
915 /// specified FileID.
919 StringRef getBufferData(FileID FID, bool *Invalid = nullptr) const;
923 unsigned getNumCreatedFIDsForFileID(FileID FID) const {
934 void setNumCreatedFIDsForFileID(FileID FID, unsigned NumFIDs) const {
948 /// \brief Return the FileID for a SourceLocation.
954 FileID getFileID(SourceLocation SpellingLoc) const {
973 SourceLocation getLocForStartOfFile(FileID FID) const {
985 SourceLocation getLocForEndOfFile(FileID FID) const {
997 SourceLocation getIncludeLoc(FileID FID) const {
1011 FileID FID = getFileID(Loc);
1077 /// \brief Decompose the specified location into a raw FileID + Offset pair.
1079 /// The first element is the FileID, the second is the offset from the
1081 std::pair<FileID, unsigned> getDecomposedLoc(SourceLocation Loc) const {
1082 FileID FID = getFileID(Loc);
1086 return std::make_pair(FileID(), 0);
1090 /// \brief Decompose the specified location into a raw FileID + Offset pair.
1094 std::pair<FileID, unsigned>
1096 FileID FID = getFileID(Loc);
1100 return std::make_pair(FileID(), 0);
1109 /// \brief Decompose the specified location into a raw FileID + Offset pair.
1113 std::pair<FileID, unsigned>
1115 FileID FID = getFileID(Loc);
1119 return std::make_pair(FileID(), 0);
1128 /// FileID.
1129 std::pair<FileID, unsigned> getDecomposedIncludedLoc(FileID FID) const;
1233 unsigned getColumnNumber(FileID FID, unsigned FilePos,
1248 unsigned getLineNumber(FileID FID, unsigned FilePos, bool *Invalid = nullptr) const;
1329 unsigned getFileIDSize(FileID FID) const;
1331 /// \brief Given a specific FileID, returns true if \p Loc is inside that
1332 /// FileID chunk and sets relative offset (offset of \p Loc from beginning
1333 /// of FileID) to \p relativeOffset.
1334 bool isInFileID(SourceLocation Loc, FileID FID,
1354 /// \brief Add a line note to the line table for the FileID and offset
1406 /// \brief Get the FileID for the given file.
1408 /// If the source file is included multiple times, the FileID will be the
1410 FileID translateFile(const FileEntry *SourceFile) const;
1414 SourceLocation translateLineCol(FileID FID,
1488 const SrcMgr::SLocEntry &getSLocEntry(FileID FID,
1525 bool isLoadedFileID(FileID FID) const {
1526 assert(FID.ID != -1 && "Using FileID sentinel value");
1531 bool isLocalFileID(FileID FID) const {
1557 /// \brief Get the entry with the given unwrapped FileID.
1560 assert(ID != -1 && "Using FileID sentinel value");
1578 /// \brief Return true if the specified FileID contains the
1580 inline bool isOffsetInFileID(FileID FID, unsigned SLocOffset) const {
1598 /// \brief Returns the previous in-order FileID or an invalid FileID if there
1600 FileID getPreviousFileID(FileID FID) const;
1602 /// \brief Returns the next in-order FileID or an invalid FileID if there is
1604 FileID getNextFileID(FileID FID) const;
1606 /// \brief Create a new fileID for the specified ContentCache and
1611 FileID createFileID(const SrcMgr::ContentCache* File,
1624 FileID getFileIDSlow(unsigned SLocOffset) const;
1625 FileID getFileIDLocal(unsigned SLocOffset) const;
1626 FileID getFileIDLoaded(unsigned SLocOffset) const;
1632 std::pair<FileID, unsigned>
1634 std::pair<FileID, unsigned>
1637 void computeMacroArgsCache(MacroArgsMap *&MacroArgsCache, FileID FID) const;
1639 FileID FID,