Go to the documentation of this file.
13 #ifndef LLVM_LIB_TABLEGEN_TGLEXER_H
14 #define LLVM_LIB_TABLEGEN_TGLEXER_H
27 template <
typename T>
class ArrayRef;
50 Assert,
Bit,
Bits,
Class,
Code,
Dag,
Def,
Defm,
Defset,
Defvar,
ElseKW,
51 FalseKW,
Field,
Foreach,
If,
In,
Include,
Int,
Let,
List,
MultiClass,
55 XConcat,
XADD,
XSUB,
XMUL,
XDIV,
XNOT,
XLOG2,
XAND,
XOR,
XXOR,
XSRA,
XSRL,
57 XCast,
XSubst,
XForEach,
XFilter,
XFoldl,
XHead,
XTail,
XSize,
XEmpty,
XIf,
58 XCond,
XEq,
XIsA,
XDag,
XNe,
XLe,
XLt,
XGe,
XGt,
XSetDagOp,
XGetDagOp,
84 const char *CurPtr =
nullptr;
88 const char *TokStart =
nullptr;
90 std::string CurStrVal;
91 int64_t CurIntVal = 0;
95 unsigned CurBuffer = 0;
108 return CurCode = LexToken(CurPtr == CurBuf.
begin());
120 "This token doesn't have a string value");
129 "This token isn't a binary integer");
130 return std::make_pair(CurIntVal, (CurPtr - TokStart)-2);
144 int peekNextChar(
int Index)
const;
145 void SkipBCPLComment();
186 struct PreprocessorControlDesc {
219 std::vector<std::unique_ptr<std::vector<PreprocessorControlDesc>>>
233 bool prepExitInclude(
bool IncludeStackMustBeEmpty);
282 bool ReturnNextLiveToken =
true);
296 bool prepSkipRegion(
bool MustNeverBeFalse);
323 StringRef prepLexMacroName();
343 bool prepSkipLineBegin();
361 bool prepSkipDirectiveEnd();
366 void prepSkipToLineEnd();
373 bool prepIsProcessingEnabled();
378 void prepReportPreprocessorStackError();
This is an optimization pass for GlobalISel generic memory operations.
TGLexer(SourceMgr &SrcMgr, ArrayRef< std::string > Macros)
const DependenciesSetTy & getDependencies() const
Represents a location in source code.
TGLexer - TableGen Lexer class.
std::pair< int64_t, unsigned > getCurBinaryIntVal() const
tgtok::TokKind getCode() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
StringSet - A wrapper for StringMap that provides set-like functionality.
StringRef - Represent a constant reference to a string, i.e.
This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling.
const CustomOperand< const MCSubtargetInfo & > Msg[]
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
int64_t getCurIntVal() const
const std::string & getCurStrVal() const
Represents a range in source code.
SMRange getLocRange() const
ArrayRef(const T &OneElt) -> ArrayRef< T >
std::set< std::string > DependenciesSetTy