clang 8.0.0

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 494 of file SourceManager.h.

## Member Function Documentation

## ◆ clear()

void clang::InBeforeInTUCacheEntry::clear | ( |  | ) |
| inline

Definition at line 552 of file SourceManager.h.

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

## ◆ 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 527 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 521 of file SourceManager.h.

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

## ◆ setCommonLoc()

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

Definition at line 557 of file SourceManager.h.

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

## ◆ setQueryFIDs()

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

Set up a new query.

Definition at line 545 of file SourceManager.h.

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

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

- include/clang/Basic/SourceManager.h