class InBeforeInTUCacheEntry
Declaration
class InBeforeInTUCacheEntry { /* full declaration omitted */ };
Description
Holds the cache used by isBeforeInTranslationUnit. The cache structure is complex enough to be worth breaking out of SourceManager.
Declared at: clang/include/clang/Basic/SourceManager.h:539
Member Variables
- private clang::FileID LQueryFID
- If these match up with a subsequent query, the result can be reused.
- private clang::FileID RQueryFID
- If these match up with a subsequent query, the result can be reused.
- private bool IsLQFIDBeforeRQFID
- This is used to compare macro expansion locations.
- private clang::FileID CommonFID
- The file found in common between the two # include traces, i.e., the nearest common ancestor of the # include tree.
- private unsigned int LCommonOffset
- Usually, this represents the location of the # include for QueryFID, but if LQueryFID is a parent of RQueryFID (or vice versa) then these can be a random token in the parent.
- private unsigned int RCommonOffset
- Usually, this represents the location of the # include for QueryFID, but if LQueryFID is a parent of RQueryFID (or vice versa) then these can be a random token in the parent.
Method Overview
- public void clear()
- public bool getCachedResult(unsigned int LOffset, unsigned int ROffset) const
- public bool isCacheValid(clang::FileID LHS, clang::FileID RHS) const
- public void setCommonLoc(clang::FileID commonFID, unsigned int lCommonOffset, unsigned int rCommonOffset)
- public void setQueryFIDs(clang::FileID LHS, clang::FileID RHS, bool isLFIDBeforeRFID)
Methods
¶void clear()
void clear()
Declared at: clang/include/clang/Basic/SourceManager.h:597
¶bool getCachedResult(unsigned int LOffset,
unsigned int ROffset) const
bool getCachedResult(unsigned int LOffset,
unsigned int ROffset) const
Description
If the cache is valid, compute the result given the specified offsets in the LHS/RHS FileID's.
Declared at: clang/include/clang/Basic/SourceManager.h:572
Parameters
- unsigned int LOffset
- unsigned int ROffset
¶bool isCacheValid(clang::FileID LHS,
clang::FileID RHS) const
bool isCacheValid(clang::FileID LHS,
clang::FileID RHS) const
Description
Return true if the currently cached values match up with the specified LHS/RHS query. If not, we can't use the cache.
Declared at: clang/include/clang/Basic/SourceManager.h:566
Parameters
- clang::FileID LHS
- clang::FileID RHS
¶void setCommonLoc(clang::FileID commonFID,
unsigned int lCommonOffset,
unsigned int rCommonOffset)
void setCommonLoc(clang::FileID commonFID,
unsigned int lCommonOffset,
unsigned int rCommonOffset)
Declared at: clang/include/clang/Basic/SourceManager.h:602
Parameters
- clang::FileID commonFID
- unsigned int lCommonOffset
- unsigned int rCommonOffset
¶void setQueryFIDs(clang::FileID LHS,
clang::FileID RHS,
bool isLFIDBeforeRFID)
void setQueryFIDs(clang::FileID LHS,
clang::FileID RHS,
bool isLFIDBeforeRFID)
Description
Set up a new query.
Declared at: clang/include/clang/Basic/SourceManager.h:590
Parameters
- clang::FileID LHS
- clang::FileID RHS
- bool isLFIDBeforeRFID