clang  6.0.0svn
Public Member Functions | List of all members
clang::InBeforeInTUCacheEntry Class Reference

Holds the cache used by isBeforeInTranslationUnit. More...

#include "clang/Basic/SourceManager.h"

Public Member Functions

bool isCacheValid (FileID LHS, FileID RHS) const
 Return true if the currently cached values match up with the specified LHS/RHS query. More...
 
bool getCachedResult (unsigned LOffset, unsigned ROffset) const
 If the cache is valid, compute the result given the specified offsets in the LHS/RHS FileID's. More...
 
void setQueryFIDs (FileID LHS, FileID RHS, bool isLFIDBeforeRFID)
 Set up a new query. More...
 
void clear ()
 
void setCommonLoc (FileID commonFID, unsigned lCommonOffset, unsigned rCommonOffset)
 

Detailed Description

Holds the cache used by isBeforeInTranslationUnit.

The cache structure is complex enough to be worth breaking out of SourceManager.

Definition at line 471 of file SourceManager.h.

Member Function Documentation

◆ clear()

void clang::InBeforeInTUCacheEntry::clear ( )
inline

Definition at line 529 of file SourceManager.h.

◆ getCachedResult()

bool clang::InBeforeInTUCacheEntry::getCachedResult ( unsigned  LOffset,
unsigned  ROffset 
) const
inline

If the cache is valid, compute the result given the specified offsets in the LHS/RHS FileID's.

Definition at line 504 of file SourceManager.h.

Referenced by clang::SourceManager::isInTheSameTranslationUnit().

◆ isCacheValid()

bool clang::InBeforeInTUCacheEntry::isCacheValid ( FileID  LHS,
FileID  RHS 
) const
inline

Return true if the currently cached values match up with the specified LHS/RHS query.

If not, we can't use the cache.

Definition at line 498 of file SourceManager.h.

Referenced by clang::SourceManager::isInTheSameTranslationUnit().

◆ setCommonLoc()

void clang::InBeforeInTUCacheEntry::setCommonLoc ( FileID  commonFID,
unsigned  lCommonOffset,
unsigned  rCommonOffset 
)
inline

Definition at line 534 of file SourceManager.h.

◆ setQueryFIDs()

void clang::InBeforeInTUCacheEntry::setQueryFIDs ( FileID  LHS,
FileID  RHS,
bool  isLFIDBeforeRFID 
)
inline

Set up a new query.

Definition at line 522 of file SourceManager.h.

Referenced by clang::SourceManager::isInTheSameTranslationUnit().


The documentation for this class was generated from the following file: