13#ifndef LLVM_ASMPARSER_LLLEXER_H
14#define LLVM_ASMPARSER_LLLEXER_H
33 const char *PrevTokEnd =
nullptr;
35 enum class ErrorPriority {
42 ErrorPriority Priority = ErrorPriority::None;
56 Type *TyVal =
nullptr;
62 bool IgnoreColonInIdentifiers =
false;
73 const std::string &
getStrVal()
const {
return StrVal; }
80 IgnoreColonInIdentifiers = val;
87 return {LC.first - 1, LC.second - 1};
93 return {LC.first - 1, LC.second - 1};
99 Error(ErrorLoc, Msg, ErrorPriority::Parser);
111 void SkipLineComment();
130 uint64_t atoull(
const char *Buffer,
const char *End);
131 uint64_t HexIntToVal(
const char *Buffer,
const char *End);
132 void HexToIntPair(
const char *Buffer,
const char *End,
uint64_t Pair[2]);
133 void FP80HexToIntPair(
const char *Buffer,
const char *End,
138 void LexError(
LocTy ErrorLoc,
const Twine &Msg) {
139 Error(ErrorLoc, Msg, ErrorPriority::Lexer);
141 void LexError(
const Twine &Msg) { LexError(
getLoc(), Msg); }
This file declares a class to represent arbitrary precision floating point values and provide a varie...
This file implements the APSInt class, which is a simple class that represents an arbitrary sized int...
An arbitrary precision integer that knows its signedness.
bool ParseError(LocTy ErrorLoc, const Twine &Msg)
unsigned getUIntVal() const
lltok::Kind getKind() const
std::pair< unsigned, unsigned > getPrevTokEndLineColumnPos()
Get the line, column position of the end of the previous token, zero-indexed exclusive.
const std::string & getStrVal() const
LLLexer(StringRef StartBuf, SourceMgr &SM, SMDiagnostic &, LLVMContext &C)
void Warning(const Twine &Msg) const
std::pair< unsigned, unsigned > getTokLineColumnPos()
Get the line, column position of the start of the current token, zero-indexed.
const APSInt & getAPSIntVal() const
void setIgnoreColonInIdentifiers(bool val)
const APFloat & getAPFloatVal() const
bool ParseError(const Twine &Msg)
This is an important class for using LLVM in a threaded context.
Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a ca...
Represents a location in source code.
static SMLoc getFromPointer(const char *Ptr)
This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling.
StringRef - Represent a constant reference to a string, i.e.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
The instances of the Type class are immutable: once they are created, they are never changed.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
std::tuple< const DIScope *, const DIScope *, const DILocalVariable * > VarID
A unique key that represents a debug variable.