13#ifndef LLVM_CLANG_LEX_PPCONDITIONALDIRECTIVERECORD_H
14#define LLVM_CLANG_LEX_PPCONDITIONALDIRECTIVERECORD_H
18#include "llvm/ADT/SmallVector.h"
30 class CondDirectiveLoc {
36 :
Loc(
Loc), RegionLoc(RegionLoc) {}
46 const CondDirectiveLoc &RHS) {
47 return SM.isBeforeInTranslationUnit(LHS.getLoc(), RHS.getLoc());
50 return SM.isBeforeInTranslationUnit(LHS.getLoc(), RHS);
53 return SM.isBeforeInTranslationUnit(LHS, RHS.getLoc());
58 typedef std::vector<CondDirectiveLoc> CondDirectiveLocsTy;
60 CondDirectiveLocsTy CondDirectiveLocs;
62 void addCondDirectiveLoc(CondDirectiveLoc DirLoc);
Defines the PPCallbacks interface.
Defines the clang::SourceLocation class and associated facilities.
A description of the current definition of a macro.
This interface provides a way to observe the actions of the preprocessor as it does its thing.
bool operator()(const CondDirectiveLoc &LHS, const CondDirectiveLoc &RHS)
bool operator()(const CondDirectiveLoc &LHS, SourceLocation RHS)
bool operator()(SourceLocation LHS, const CondDirectiveLoc &RHS)
Records preprocessor conditional directive regions and allows querying in which region source locatio...
bool areInDifferentConditionalDirectiveRegion(SourceLocation LHS, SourceLocation RHS) const
Returns true if the given locations are in different regions, separated by conditional directive bloc...
SourceManager & getSourceManager() const
size_t getTotalMemory() const
bool rangeIntersectsConditionalDirective(SourceRange Range) const
Returns true if the given range intersects with a conditional directive.
SourceLocation findConditionalDirectiveRegionLoc(SourceLocation Loc) const
Encodes a location in the source.
This class handles loading and caching of source files into memory.
A trivial tuple used to represent a source range.
Token - This structure provides full information about a lexed token.
The JSON file list parser is used to communicate input to InstallAPI.
@ If
'if' clause, allowed on all the Compute Constructs, Data Constructs, Executable Constructs,...