13#ifndef LLVM_LIB_TABLEGEN_TGLEXER_H
14#define LLVM_LIB_TABLEGEN_TGLEXER_H
196 const char *CurPtr =
nullptr;
200 const char *TokStart =
nullptr;
202 std::string CurStrVal;
203 int64_t CurIntVal = 0;
207 unsigned CurBuffer = 0;
218 "This token doesn't have a string value");
227 "This token isn't a binary integer");
228 return {CurIntVal, (CurPtr - TokStart) - 2};
242 int peekNextChar(
int Index)
const;
243 void SkipBCPLComment();
284 struct PreprocessorControlDesc {
330 bool prepExitInclude(
bool IncludeStackMustBeEmpty);
378 bool ReturnNextLiveToken =
true);
392 bool prepSkipRegion(
bool MustNeverBeFalse);
419 StringRef prepLexMacroName();
439 bool prepSkipLineBegin();
457 bool prepSkipDirectiveEnd();
464 bool prepIsProcessingEnabled();
469 void prepReportPreprocessorStackError();
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the SmallVector class.
StringSet - A set-like wrapper for the StringMap.
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Represents a location in source code.
Represents a range in source code.
This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling.
Represent a constant reference to a string, i.e.
StringSet - A wrapper for StringMap that provides set-like functionality.
SMRange getLocRange() const
int64_t getCurIntVal() const
std::pair< int64_t, unsigned > getCurBinaryIntVal() const
const std::string & getCurStrVal() const
tgtok::TokKind getCode() const
TGLexer(SourceMgr &SrcMgr, ArrayRef< std::string > Macros)
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
static bool isBangOperator(tgtok::TokKind Kind)
isBangOperator - Return true if this is a bang operator.
static bool isObjectStart(tgtok::TokKind Kind)
isObjectStart - Return true if this is a valid first token for a statement.
static bool isStringValue(tgtok::TokKind Kind)
isStringValue - Return true if this is a string value.
This is an optimization pass for GlobalISel generic memory operations.
class LLVM_GSL_OWNER SmallVector
Forward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference s...