reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

include/llvm/ADT/ArrayRef.h
   43     using iterator = const T *;
   44     using const_iterator = const T *;
   50     const T *Data = nullptr;
   66     /*implicit*/ ArrayRef(const T &OneElt)
   70     /*implicit*/ ArrayRef(const T *data, size_t length)
   74     ArrayRef(const T *begin, const T *end)
   74     ArrayRef(const T *begin, const T *end)
   81     /*implicit*/ ArrayRef(const SmallVectorTemplateCommon<T, U> &Vec)
   87     /*implicit*/ ArrayRef(const std::vector<T, A> &Vec)
   92     /*implicit*/ constexpr ArrayRef(const std::array<T, N> &Arr)
   97     /*implicit*/ constexpr ArrayRef(const T (&Arr)[N]) : Data(Arr), Length(N) {}
  100     /*implicit*/ ArrayRef(const std::initializer_list<T> &Vec)
  145     const T *data() const { return Data; }
  151     const T &front() const {
  157     const T &back() const {
  163     template <typename Allocator> ArrayRef<T> copy(Allocator &A) {
  178     ArrayRef<T> slice(size_t N, size_t M) const {
  184     ArrayRef<T> slice(size_t N) const { return slice(N, size() - N); }
  187     ArrayRef<T> drop_front(size_t N = 1) const {
  193     ArrayRef<T> drop_back(size_t N = 1) const {
  200     template <class PredicateT> ArrayRef<T> drop_while(PredicateT Pred) const {
  206     template <class PredicateT> ArrayRef<T> drop_until(PredicateT Pred) const {
  211     ArrayRef<T> take_front(size_t N = 1) const {
  218     ArrayRef<T> take_back(size_t N = 1) const {
  226     template <class PredicateT> ArrayRef<T> take_while(PredicateT Pred) const {
  232     template <class PredicateT> ArrayRef<T> take_until(PredicateT Pred) const {
  239     const T &operator[](size_t Index) const {
  249     typename std::enable_if<std::is_same<U, T>::value, ArrayRef<T>>::type &
  257     typename std::enable_if<std::is_same<U, T>::value, ArrayRef<T>>::type &
  263     std::vector<T> vec() const {
  270     operator std::vector<T>() const {
  290   class LLVM_NODISCARD MutableArrayRef : public ArrayRef<T> {
  292     using iterator = T *;
  302     /*implicit*/ MutableArrayRef(T &OneElt) : ArrayRef<T>(OneElt) {}
  305     /*implicit*/ MutableArrayRef(T *data, size_t length)
  309     MutableArrayRef(T *begin, T *end) : ArrayRef<T>(begin, end) {}
  309     MutableArrayRef(T *begin, T *end) : ArrayRef<T>(begin, end) {}
  312     /*implicit*/ MutableArrayRef(SmallVectorImpl<T> &Vec)
  316     /*implicit*/ MutableArrayRef(std::vector<T> &Vec)
  321     /*implicit*/ constexpr MutableArrayRef(std::array<T, N> &Arr)
  326     /*implicit*/ constexpr MutableArrayRef(T (&Arr)[N]) : ArrayRef<T>(Arr) {}
  328     T *data() const { return const_cast<T*>(ArrayRef<T>::data()); }
  337     T &front() const {
  343     T &back() const {
  350     MutableArrayRef<T> slice(size_t N, size_t M) const {
  356     MutableArrayRef<T> slice(size_t N) const {
  361     MutableArrayRef<T> drop_front(size_t N = 1) const {
  366     MutableArrayRef<T> drop_back(size_t N = 1) const {
  374     MutableArrayRef<T> drop_while(PredicateT Pred) const {
  381     MutableArrayRef<T> drop_until(PredicateT Pred) const {
  386     MutableArrayRef<T> take_front(size_t N = 1) const {
  393     MutableArrayRef<T> take_back(size_t N = 1) const {
  402     MutableArrayRef<T> take_while(PredicateT Pred) const {
  409     MutableArrayRef<T> take_until(PredicateT Pred) const {
  416     T &operator[](size_t Index) const {
include/llvm/ADT/SmallVector.h
   75   AlignedCharArrayUnion<T> FirstEl;
  114   using value_type = T;
  115   using iterator = T *;
  116   using const_iterator = const T *;
  121   using reference = T &;
  122   using const_reference = const T &;
  123   using pointer = T *;
  124   using const_pointer = const T *;
  179 class SmallVectorTemplateBase : public SmallVectorTemplateCommon<T> {
  183   static void destroy_range(T *S, T *E) {
  183   static void destroy_range(T *S, T *E) {
  211   void push_back(const T &Elt) {
  214     ::new ((void*) this->end()) T(Elt);
  218   void push_back(T &&Elt) {
  221     ::new ((void*) this->end()) T(::std::move(Elt));
  240   T *NewElts = static_cast<T*>(llvm::safe_malloc(NewCapacity*sizeof(T)));
  240   T *NewElts = static_cast<T*>(llvm::safe_malloc(NewCapacity*sizeof(T)));
  315 class SmallVectorImpl : public SmallVectorTemplateBase<T> {
  316   using SuperClass = SmallVectorTemplateBase<T>;
  357   void resize(size_type N, const T &NV) {
  374   LLVM_NODISCARD T pop_back_val() {
  397   void append(size_type NumInputs, const T &Elt) {
  405   void append(std::initializer_list<T> IL) {
  412   void assign(size_type NumElts, const T &Elt) {
  429   void assign(std::initializer_list<T> IL) {
  467   iterator insert(iterator I, T &&Elt) {
  482     ::new ((void*) this->end()) T(::std::move(this->back()));
  489     T *EltPtr = &Elt;
  497   iterator insert(iterator I, const T &Elt) {
  511     ::new ((void*) this->end()) T(std::move(this->back()));
  518     const T *EltPtr = &Elt;
  526   iterator insert(iterator I, size_type NumToInsert, const T &Elt) {
  637   void insert(iterator I, std::initializer_list<T> IL) {
  641   template <typename... ArgTypes> reference emplace_back(ArgTypes &&... Args) {
  644     ::new ((void *)this->end()) T(std::forward<ArgTypes>(Args)...);
  820   AlignedCharArrayUnion<T> InlineElts[N];
  837 class SmallVector : public SmallVectorImpl<T>, SmallVectorStorage<T, N> {
  837 class SmallVector : public SmallVectorImpl<T>, SmallVectorStorage<T, N> {
  846   explicit SmallVector(size_t Size, const T &Value = T())
  865   SmallVector(std::initializer_list<T> IL) : SmallVectorImpl<T>(N) {
  884   SmallVector(SmallVectorImpl<T> &&RHS) : SmallVectorImpl<T>(N) {
include/llvm/ADT/StringMap.h
  129   ValueTy second;
  138   const ValueTy &getValue() const { return second; }
  139   ValueTy &getValue() { return second; }
  141   void setValue(const ValueTy &V) { second = V; }
  158 class StringMapEntry final : public StringMapEntryStorage<ValueTy> {
  246   using MapEntryTy = StringMapEntry<ValueTy>;
  260   StringMap(std::initializer_list<std::pair<StringRef, ValueTy>> List)
  330   using mapped_type = ValueTy;
  331   using value_type = StringMapEntry<ValueTy>;
  334   using const_iterator = StringMapConstIterator<ValueTy>;
  335   using iterator = StringMapIterator<ValueTy>;
  350   iterator_range<StringMapKeyIterator<ValueTy>> keys() const {
  369   ValueTy lookup(StringRef Key) const {
  378   ValueTy &operator[](StringRef Key) { return try_emplace(Key).first->second; }
  413   std::pair<iterator, bool> insert(std::pair<StringRef, ValueTy> KV) {
  531     : public StringMapIterBase<StringMapConstIterator<ValueTy>,
  532                                const StringMapEntry<ValueTy>> {
  533   using base = StringMapIterBase<StringMapConstIterator<ValueTy>,
  534                                  const StringMapEntry<ValueTy>>;
  542   const StringMapEntry<ValueTy> &operator*() const {
  548 class StringMapIterator : public StringMapIterBase<StringMapIterator<ValueTy>,
  549                                                    StringMapEntry<ValueTy>> {
  551       StringMapIterBase<StringMapIterator<ValueTy>, StringMapEntry<ValueTy>>;
  551       StringMapIterBase<StringMapIterator<ValueTy>, StringMapEntry<ValueTy>>;
  559   StringMapEntry<ValueTy> &operator*() const {
  563   operator StringMapConstIterator<ValueTy>() const {
include/llvm/MC/MCAsmMacro.h
  131   std::vector<AsmToken> Value;
include/llvm/MC/MCParser/AsmLexer.h
   36   AsmToken LexToken() override;
   48   size_t peekTokens(MutableArrayRef<AsmToken> Buf,
   57   AsmToken ReturnError(const char *Loc, const std::string &Msg);
   59   AsmToken LexIdentifier();
   60   AsmToken LexSlash();
   61   AsmToken LexLineComment();
   62   AsmToken LexDigit();
   63   AsmToken LexSingleQuote();
   64   AsmToken LexQuote();
   65   AsmToken LexFloatLiteral();
   66   AsmToken LexHexFloatLiteral(bool NoIntDigits);
include/llvm/MC/MCParser/MCAsmLexer.h
   41   SmallVector<AsmToken, 1> CurTok;
   57   virtual AsmToken LexToken() = 0;
   73   const AsmToken &Lex() {
   76     IsAtStartOfStatement = CurTok.front().getKind() == AsmToken::EndOfStatement;
   81       AsmToken T = LexToken();
   87   void UnLex(AsmToken const &Token) {
  100   const AsmToken &getTok() const {
  105   const AsmToken peekTok(bool ShouldSkipSpace = true) {
  106     AsmToken Tok;
  108     MutableArrayRef<AsmToken> Buf(Tok);
  118   virtual size_t peekTokens(MutableArrayRef<AsmToken> Buf,
  132   AsmToken::TokenKind getKind() const { return getTok().getKind(); }
  135   bool is(AsmToken::TokenKind K) const { return getTok().is(K); }
  138   bool isNot(AsmToken::TokenKind K) const { return getTok().isNot(K); }
include/llvm/MC/MCParser/MCAsmParser.h
  217   virtual const AsmToken &Lex() = 0;
  220   const AsmToken &getTok() const;
  226   bool parseToken(AsmToken::TokenKind T, const Twine &Msg = "unexpected token");
  229   bool parseOptionalToken(AsmToken::TokenKind T);
include/llvm/MC/MCParser/MCAsmParserExtension.h
   86   const AsmToken &Lex() { return getParser().Lex(); }
   87   const AsmToken &getTok() { return getParser().getTok(); }
   88   bool parseToken(AsmToken::TokenKind T,
   97   bool parseOptionalToken(AsmToken::TokenKind T) {
include/llvm/MC/MCParser/MCTargetAsmParser.h
  403                                 AsmToken Token, OperandVector &Operands) {
  417   virtual bool ParseDirective(AsmToken DirectiveID) = 0;
  470   virtual bool isLabel(AsmToken &Token) { return true; };
  490                                               AsmToken::TokenKind OperatorToken,
include/llvm/Support/AlignOf.h
   30   T t;
   39 template <typename T> union SizerImpl<T> { char arr[sizeof(T)]; };
   50       llvm::detail::SizerImpl<T, Ts...>)];
include/llvm/Support/type_traits.h
   91     T t;
  122     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<const F &>(), std::true_type{});
  122     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<const F &>(), std::true_type{});
  122     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<const F &>(), std::true_type{});
  130     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<F &&>(), std::true_type{});
  130     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<F &&>(), std::true_type{});
  130     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<F &&>(), std::true_type{});
  145       std::is_copy_constructible<detail::trivial_helper<T>>::value;
  147       !std::is_copy_constructible<T>::value;
  151       std::is_move_constructible<detail::trivial_helper<T>>::value;
  153       !std::is_move_constructible<T>::value;
  157       is_copy_assignable<detail::trivial_helper<T>>::value;
  159       !is_copy_assignable<T>::value;
  163       is_move_assignable<detail::trivial_helper<T>>::value;
  165       !is_move_assignable<T>::value;
  169       std::is_destructible<detail::trivial_helper<T>>::value;
  181   static_assert(value == std::is_trivially_copyable<T>::value,
lib/MC/MCAsmMacro.cpp
   24     for (const AsmToken &T : Value) {
lib/MC/MCParser/AsmLexer.cpp
   52 AsmToken AsmLexer::ReturnError(const char *Loc, const std::string &Msg) {
   55   return AsmToken(AsmToken::Error, StringRef(Loc, CurPtr - Loc));
   67 AsmToken AsmLexer::LexFloatLiteral() {
   86   return AsmToken(AsmToken::Real,
   96 AsmToken AsmLexer::LexHexFloatLiteral(bool NoIntDigits) {
  134   return AsmToken(AsmToken::Real, StringRef(TokStart, CurPtr - TokStart));
  143 AsmToken AsmLexer::LexIdentifier() {
  160     return AsmToken(AsmToken::Dot, StringRef(TokStart, 1));
  162   return AsmToken(AsmToken::Identifier, StringRef(TokStart, CurPtr - TokStart));
  167 AsmToken AsmLexer::LexSlash() {
  177     return AsmToken(AsmToken::Slash, StringRef(TokStart, 1));
  196       return AsmToken(AsmToken::Comment,
  205 AsmToken AsmLexer::LexLineComment() {
  227     return AsmToken(AsmToken::EndOfStatement,
  231   return AsmToken(AsmToken::EndOfStatement,
  272 static AsmToken intToken(StringRef Ref, APInt &Value)
  275     return AsmToken(AsmToken::Integer, Ref, Value);
  276   return AsmToken(AsmToken::BigNum, Ref, Value);
  286 AsmToken AsmLexer::LexDigit() {
  361       return AsmToken(AsmToken::Integer, Result, 0);
  435 AsmToken AsmLexer::LexSingleQuote() {
  466   return AsmToken(AsmToken::Integer, Res, Value);
  470 AsmToken AsmLexer::LexQuote() {
  485   return AsmToken(AsmToken::String, StringRef(TokStart, CurPtr - TokStart));
  508 size_t AsmLexer::peekTokens(MutableArrayRef<AsmToken> Buf,
  521     AsmToken Token = LexToken();
  525     if (Token.is(AsmToken::Eof))
  551 AsmToken AsmLexer::LexToken() {
  559     AsmToken TokenBuf[2];
  560     MutableArrayRef<AsmToken> Buf(TokenBuf, 2);
  563     if (IsAtStartOfLine && num == 2 && TokenBuf[0].is(AsmToken::Integer) &&
  564         TokenBuf[1].is(AsmToken::String)) {
  569       return AsmToken(AsmToken::HashDirective, s);
  581     return AsmToken(AsmToken::EndOfStatement,
  590     return AsmToken(AsmToken::EndOfStatement, StringRef(TokStart, 1));
  606     return AsmToken(AsmToken::Eof, StringRef(TokStart, 0));
  616       return AsmToken(AsmToken::Space, StringRef(TokStart, CurPtr - TokStart));
  623     return AsmToken(AsmToken::EndOfStatement,
  629     return AsmToken(AsmToken::EndOfStatement, StringRef(TokStart, 1));
  630   case ':': return AsmToken(AsmToken::Colon, StringRef(TokStart, 1));
  631   case '+': return AsmToken(AsmToken::Plus, StringRef(TokStart, 1));
  632   case '~': return AsmToken(AsmToken::Tilde, StringRef(TokStart, 1));
  633   case '(': return AsmToken(AsmToken::LParen, StringRef(TokStart, 1));
  634   case ')': return AsmToken(AsmToken::RParen, StringRef(TokStart, 1));
  635   case '[': return AsmToken(AsmToken::LBrac, StringRef(TokStart, 1));
  636   case ']': return AsmToken(AsmToken::RBrac, StringRef(TokStart, 1));
  637   case '{': return AsmToken(AsmToken::LCurly, StringRef(TokStart, 1));
  638   case '}': return AsmToken(AsmToken::RCurly, StringRef(TokStart, 1));
  639   case '*': return AsmToken(AsmToken::Star, StringRef(TokStart, 1));
  640   case ',': return AsmToken(AsmToken::Comma, StringRef(TokStart, 1));
  641   case '$': return AsmToken(AsmToken::Dollar, StringRef(TokStart, 1));
  642   case '@': return AsmToken(AsmToken::At, StringRef(TokStart, 1));
  643   case '\\': return AsmToken(AsmToken::BackSlash, StringRef(TokStart, 1));
  647       return AsmToken(AsmToken::EqualEqual, StringRef(TokStart, 2));
  649     return AsmToken(AsmToken::Equal, StringRef(TokStart, 1));
  653       return AsmToken(AsmToken::MinusGreater, StringRef(TokStart, 2));
  655     return AsmToken(AsmToken::Minus, StringRef(TokStart, 1));
  659       return AsmToken(AsmToken::PipePipe, StringRef(TokStart, 2));
  661     return AsmToken(AsmToken::Pipe, StringRef(TokStart, 1));
  662   case '^': return AsmToken(AsmToken::Caret, StringRef(TokStart, 1));
  666       return AsmToken(AsmToken::AmpAmp, StringRef(TokStart, 2));
  668     return AsmToken(AsmToken::Amp, StringRef(TokStart, 1));
  672       return AsmToken(AsmToken::ExclaimEqual, StringRef(TokStart, 2));
  674     return AsmToken(AsmToken::Exclaim, StringRef(TokStart, 1));
  677       AsmToken::TokenKind Operator;
  683               .StartsWith("call16", {AsmToken::PercentCall16, 7})
  684               .StartsWith("call_hi", {AsmToken::PercentCall_Hi, 8})
  685               .StartsWith("call_lo", {AsmToken::PercentCall_Lo, 8})
  686               .StartsWith("dtprel_hi", {AsmToken::PercentDtprel_Hi, 10})
  687               .StartsWith("dtprel_lo", {AsmToken::PercentDtprel_Lo, 10})
  688               .StartsWith("got_disp", {AsmToken::PercentGot_Disp, 9})
  689               .StartsWith("got_hi", {AsmToken::PercentGot_Hi, 7})
  690               .StartsWith("got_lo", {AsmToken::PercentGot_Lo, 7})
  691               .StartsWith("got_ofst", {AsmToken::PercentGot_Ofst, 9})
  692               .StartsWith("got_page", {AsmToken::PercentGot_Page, 9})
  693               .StartsWith("gottprel", {AsmToken::PercentGottprel, 9})
  694               .StartsWith("got", {AsmToken::PercentGot, 4})
  695               .StartsWith("gp_rel", {AsmToken::PercentGp_Rel, 7})
  696               .StartsWith("higher", {AsmToken::PercentHigher, 7})
  697               .StartsWith("highest", {AsmToken::PercentHighest, 8})
  698               .StartsWith("hi", {AsmToken::PercentHi, 3})
  699               .StartsWith("lo", {AsmToken::PercentLo, 3})
  700               .StartsWith("neg", {AsmToken::PercentNeg, 4})
  701               .StartsWith("pcrel_hi", {AsmToken::PercentPcrel_Hi, 9})
  702               .StartsWith("pcrel_lo", {AsmToken::PercentPcrel_Lo, 9})
  703               .StartsWith("tlsgd", {AsmToken::PercentTlsgd, 6})
  704               .StartsWith("tlsldm", {AsmToken::PercentTlsldm, 7})
  705               .StartsWith("tprel_hi", {AsmToken::PercentTprel_Hi, 9})
  706               .StartsWith("tprel_lo", {AsmToken::PercentTprel_Lo, 9})
  707               .Default({AsmToken::Percent, 1});
  709       if (Operator != AsmToken::Percent) {
  714     return AsmToken(AsmToken::Percent, StringRef(TokStart, 1));
  718   case '#': return AsmToken(AsmToken::Hash, StringRef(TokStart, 1));
  728       return AsmToken(AsmToken::LessLess, StringRef(TokStart, 2));
  731       return AsmToken(AsmToken::LessEqual, StringRef(TokStart, 2));
  734       return AsmToken(AsmToken::LessGreater, StringRef(TokStart, 2));
  736       return AsmToken(AsmToken::Less, StringRef(TokStart, 1));
  742       return AsmToken(AsmToken::GreaterGreater, StringRef(TokStart, 2));
  745       return AsmToken(AsmToken::GreaterEqual, StringRef(TokStart, 2));
  747       return AsmToken(AsmToken::Greater, StringRef(TokStart, 1));
lib/MC/MCParser/AsmParser.cpp
   84 typedef std::vector<AsmToken> MCAsmMacroArgument;
  232   const AsmToken &Lex() override;
  349   unsigned getBinOpPrecedence(AsmToken::TokenKind K,
  830 const AsmToken &AsmParser::Lex() {
  831   if (Lexer.getTok().is(AsmToken::Error))
  835   if (getTok().is(AsmToken::EndOfStatement)) {
  842   const AsmToken *tok = &Lexer.Lex();
  845   while (tok->is(AsmToken::Comment)) {
  851   if (tok->is(AsmToken::Eof)) {
  917   while (Lexer.isNot(AsmToken::Eof)) {
  924     if (Parsed && !hasPendingError() && Lexer.getTok().is(AsmToken::Error)) {
 1011   while (Lexer.isNot(AsmToken::EndOfStatement) && Lexer.isNot(AsmToken::Eof))
 1011   while (Lexer.isNot(AsmToken::EndOfStatement) && Lexer.isNot(AsmToken::Eof))
 1015   if (Lexer.is(AsmToken::EndOfStatement))
 1022   while (Lexer.isNot(AsmToken::EndOfStatement) && Lexer.isNot(AsmToken::Eof))
 1022   while (Lexer.isNot(AsmToken::EndOfStatement) && Lexer.isNot(AsmToken::Eof))
 1032   while (Lexer.isNot(AsmToken::EndOfStatement) &&
 1033          Lexer.isNot(AsmToken::Comma) && Lexer.isNot(AsmToken::Eof))
 1033          Lexer.isNot(AsmToken::Comma) && Lexer.isNot(AsmToken::Eof))
 1048   if (Lexer.isNot(AsmToken::RParen))
 1064   if (parseToken(AsmToken::RBrac, "expected ']' in brackets expression"))
 1077   AsmToken::TokenKind FirstTokenKind = Lexer.getKind();
 1082   case AsmToken::Error:
 1084   case AsmToken::Exclaim:
 1090   case AsmToken::Dollar:
 1091   case AsmToken::At:
 1092   case AsmToken::String:
 1093   case AsmToken::Identifier: {
 1097       if (getTok().is(AsmToken::Dollar)) {
 1115       if (FirstTokenKind == AsmToken::String) {
 1116         if (Lexer.is(AsmToken::At)) {
 1128     } else if (Lexer.is(AsmToken::LParen)) {
 1133       if (parseToken(AsmToken::RParen,
 1184   case AsmToken::BigNum:
 1186   case AsmToken::Integer: {
 1193     if (Lexer.getKind() == AsmToken::Identifier) {
 1217   case AsmToken::Real: {
 1225   case AsmToken::Dot: {
 1235   case AsmToken::LParen:
 1238   case AsmToken::LBrac:
 1243   case AsmToken::Minus:
 1249   case AsmToken::Plus:
 1255   case AsmToken::Tilde:
 1263   case AsmToken::PercentCall16:
 1264   case AsmToken::PercentCall_Hi:
 1265   case AsmToken::PercentCall_Lo:
 1266   case AsmToken::PercentDtprel_Hi:
 1267   case AsmToken::PercentDtprel_Lo:
 1268   case AsmToken::PercentGot:
 1269   case AsmToken::PercentGot_Disp:
 1270   case AsmToken::PercentGot_Hi:
 1271   case AsmToken::PercentGot_Lo:
 1272   case AsmToken::PercentGot_Ofst:
 1273   case AsmToken::PercentGot_Page:
 1274   case AsmToken::PercentGottprel:
 1275   case AsmToken::PercentGp_Rel:
 1276   case AsmToken::PercentHi:
 1277   case AsmToken::PercentHigher:
 1278   case AsmToken::PercentHighest:
 1279   case AsmToken::PercentLo:
 1280   case AsmToken::PercentNeg:
 1281   case AsmToken::PercentPcrel_Hi:
 1282   case AsmToken::PercentPcrel_Lo:
 1283   case AsmToken::PercentTlsgd:
 1284   case AsmToken::PercentTlsldm:
 1285   case AsmToken::PercentTprel_Hi:
 1286   case AsmToken::PercentTprel_Lo:
 1288     if (Lexer.isNot(AsmToken::LParen))
 1293     if (Lexer.isNot(AsmToken::RParen))
 1419   if (Lexer.getKind() == AsmToken::At) {
 1422     if (Lexer.isNot(AsmToken::Identifier))
 1467       if (parseToken(AsmToken::RParen,
 1488 static unsigned getDarwinBinOpPrecedence(AsmToken::TokenKind K,
 1496   case AsmToken::AmpAmp:
 1499   case AsmToken::PipePipe:
 1506   case AsmToken::Pipe:
 1509   case AsmToken::Caret:
 1512   case AsmToken::Amp:
 1517   case AsmToken::EqualEqual:
 1520   case AsmToken::ExclaimEqual:
 1521   case AsmToken::LessGreater:
 1524   case AsmToken::Less:
 1527   case AsmToken::LessEqual:
 1530   case AsmToken::Greater:
 1533   case AsmToken::GreaterEqual:
 1538   case AsmToken::LessLess:
 1541   case AsmToken::GreaterGreater:
 1546   case AsmToken::Plus:
 1549   case AsmToken::Minus:
 1554   case AsmToken::Star:
 1557   case AsmToken::Slash:
 1560   case AsmToken::Percent:
 1566 static unsigned getGNUBinOpPrecedence(AsmToken::TokenKind K,
 1574   case AsmToken::AmpAmp:
 1577   case AsmToken::PipePipe:
 1582   case AsmToken::EqualEqual:
 1585   case AsmToken::ExclaimEqual:
 1586   case AsmToken::LessGreater:
 1589   case AsmToken::Less:
 1592   case AsmToken::LessEqual:
 1595   case AsmToken::Greater:
 1598   case AsmToken::GreaterEqual:
 1603   case AsmToken::Plus:
 1606   case AsmToken::Minus:
 1613   case AsmToken::Pipe:
 1616   case AsmToken::Caret:
 1619   case AsmToken::Amp:
 1624   case AsmToken::Star:
 1627   case AsmToken::Slash:
 1630   case AsmToken::Percent:
 1633   case AsmToken::LessLess:
 1636   case AsmToken::GreaterGreater:
 1642 unsigned AsmParser::getBinOpPrecedence(AsmToken::TokenKind K,
 1690   while (Lexer.is(AsmToken::Space))
 1692   if (Lexer.is(AsmToken::EndOfStatement)) {
 1701   AsmToken ID = getTok();
 1705   if (Lexer.is(AsmToken::HashDirective))
 1708   if (Lexer.is(AsmToken::Integer)) {
 1719       if (Lexer.getKind() != AsmToken::Colon) {
 1726   } else if (Lexer.is(AsmToken::Dot)) {
 1730   } else if (Lexer.is(AsmToken::LCurly)) {
 1735   } else if (Lexer.is(AsmToken::RCurly)) {
 1739   } else if (Lexer.is(AsmToken::Star) &&
 1808   case AsmToken::Colon: {
 1844     if (getTok().is(AsmToken::Hash)) {
 1847       Lexer.UnLex(AsmToken(AsmToken::EndOfStatement, CommentStr));
 1852     if (getTok().is(AsmToken::EndOfStatement)) {
 1873   case AsmToken::Equal:
 2285   if (Lexer.isNot(AsmToken::LCurly) && Lexer.isNot(AsmToken::RCurly))
 2285   if (Lexer.isNot(AsmToken::LCurly) && Lexer.isNot(AsmToken::RCurly))
 2290   if (Lexer.is(AsmToken::EndOfStatement))
 2450         for (const AsmToken &Token : A[Index])
 2487           for (const AsmToken &Token : A[Index])
 2496                 Token.is(AsmToken::Integer))
 2502                      Token.is(AsmToken::String)) {
 2507             else if (Token.isNot(AsmToken::String) || VarargParameter)
 2528 static bool isOperator(AsmToken::TokenKind kind) {
 2532   case AsmToken::Plus:
 2533   case AsmToken::Minus:
 2534   case AsmToken::Tilde:
 2535   case AsmToken::Slash:
 2536   case AsmToken::Star:
 2537   case AsmToken::Dot:
 2538   case AsmToken::Equal:
 2539   case AsmToken::EqualEqual:
 2540   case AsmToken::Pipe:
 2541   case AsmToken::PipePipe:
 2542   case AsmToken::Caret:
 2543   case AsmToken::Amp:
 2544   case AsmToken::AmpAmp:
 2545   case AsmToken::Exclaim:
 2546   case AsmToken::ExclaimEqual:
 2547   case AsmToken::Less:
 2548   case AsmToken::LessEqual:
 2549   case AsmToken::LessLess:
 2550   case AsmToken::LessGreater:
 2551   case AsmToken::Greater:
 2552   case AsmToken::GreaterEqual:
 2553   case AsmToken::GreaterGreater:
 2579     if (Lexer.isNot(AsmToken::EndOfStatement)) {
 2581       MA.emplace_back(AsmToken::String, Str);
 2595     if (Lexer.is(AsmToken::Eof) || Lexer.is(AsmToken::Equal))
 2595     if (Lexer.is(AsmToken::Eof) || Lexer.is(AsmToken::Equal))
 2600       if (Lexer.is(AsmToken::Comma))
 2603       if (Lexer.is(AsmToken::Space)) {
 2617           if (Lexer.is(AsmToken::Space))
 2629     if (Lexer.is(AsmToken::EndOfStatement))
 2633     if (Lexer.is(AsmToken::LParen))
 2635     else if (Lexer.is(AsmToken::RParen) && ParenLevel)
 2667     if (Lexer.is(AsmToken::Identifier) && Lexer.peekTok().is(AsmToken::Equal)) {
 2667     if (Lexer.is(AsmToken::Identifier) && Lexer.peekTok().is(AsmToken::Equal)) {
 2671       if (Lexer.isNot(AsmToken::Equal))
 2685     if (AltMacroMode && Lexer.is(AsmToken::Percent)) {
 2697       AsmToken newToken(AsmToken::Integer,
 2697       AsmToken newToken(AsmToken::Integer,
 2700     } else if (AltMacroMode && Lexer.is(AsmToken::Less) &&
 2707       AsmToken newToken(AsmToken::String,
 2707       AsmToken newToken(AsmToken::String,
 2742     if (Lexer.is(AsmToken::EndOfStatement)) {
 2760     if (Lexer.is(AsmToken::Comma))
 2858   if (Lexer.is(AsmToken::Dollar) || Lexer.is(AsmToken::At)) {
 2858   if (Lexer.is(AsmToken::Dollar) || Lexer.is(AsmToken::At)) {
 2863     AsmToken Buf[1];
 2866     if (Buf[0].isNot(AsmToken::Identifier))
 2882   if (Lexer.isNot(AsmToken::Identifier) && Lexer.isNot(AsmToken::String))
 2882   if (Lexer.isNot(AsmToken::Identifier) && Lexer.isNot(AsmToken::String))
 2899       parseToken(AsmToken::Comma) || parseAssignment(Name, allow_redef, true))
 2905   if (check(getTok().isNot(AsmToken::String), "expected string"))
 3015       (parseToken(AsmToken::Comma, "expected comma") ||
 3016        check(getTok().isNot(AsmToken::Identifier), "expected relocation name")))
 3023   if (Lexer.is(AsmToken::Comma)) {
 3034   if (parseToken(AsmToken::EndOfStatement,
 3072   if (Asm.getTok().isNot(AsmToken::Integer) &&
 3073       Asm.getTok().isNot(AsmToken::BigNum))
 3119   if (getLexer().is(AsmToken::Minus)) {
 3122   } else if (getLexer().is(AsmToken::Plus))
 3125   if (Lexer.is(AsmToken::Error))
 3127   if (Lexer.isNot(AsmToken::Integer) && Lexer.isNot(AsmToken::Real) &&
 3127   if (Lexer.isNot(AsmToken::Integer) && Lexer.isNot(AsmToken::Real) &&
 3128       Lexer.isNot(AsmToken::Identifier))
 3134   if (getLexer().is(AsmToken::Identifier)) {
 3182   if (getLexer().is(AsmToken::Comma)) {
 3188   if (parseToken(AsmToken::EndOfStatement,
 3209   if (parseOptionalToken(AsmToken::Comma)) {
 3213     if (parseOptionalToken(AsmToken::Comma)) {
 3219   if (parseToken(AsmToken::EndOfStatement,
 3250   if (parseOptionalToken(AsmToken::Comma))
 3253   if (parseToken(AsmToken::EndOfStatement))
 3273     if (parseOptionalToken(AsmToken::Comma)) {
 3277       if (getTok().isNot(AsmToken::Comma)) {
 3282       if (parseOptionalToken(AsmToken::Comma))
 3287     return parseToken(AsmToken::EndOfStatement);
 3293   if (IsPow2 && (ValueSize == 1) && getTok().is(AsmToken::EndOfStatement)) {
 3295     return parseToken(AsmToken::EndOfStatement);
 3361   if (getLexer().is(AsmToken::Integer)) {
 3373   if (check(getTok().isNot(AsmToken::String),
 3381   if (getLexer().is(AsmToken::String)) {
 3399   while (!parseOptionalToken(AsmToken::EndOfStatement)) {
 3401     if (check(getTok().isNot(AsmToken::Identifier),
 3415           check(getTok().isNot(AsmToken::String),
 3478   if (getLexer().is(AsmToken::Integer)) {
 3484   if (parseToken(AsmToken::EndOfStatement,
 3509   if (getLexer().is(AsmToken::Integer)) {
 3517   if (getLexer().is(AsmToken::Integer)) {
 3607       check(getTok().isNot(AsmToken::String),
 3611   if (!parseOptionalToken(AsmToken::EndOfStatement)) {
 3612     if (check(getTok().isNot(AsmToken::String),
 3617         parseToken(AsmToken::EndOfStatement,
 3665       parseToken(AsmToken::EndOfStatement,
 3696   if (check((getLexer().isNot(AsmToken::Identifier) ||
 3707   if (check((getLexer().isNot(AsmToken::Identifier) ||
 3720   if (getLexer().is(AsmToken::Integer)) {
 3725   if (parseToken(AsmToken::EndOfStatement,
 3751   if (getLexer().is(AsmToken::Integer)) {
 3759   if (getLexer().is(AsmToken::Integer)) {
 3810       parseToken(AsmToken::Comma,
 3814       parseToken(AsmToken::Comma,
 3852   if (parseToken(AsmToken::EndOfStatement, "Expected End of Statement"))
 3875   while (getLexer().is(AsmToken::Identifier)) {
 3893           AsmToken::Comma,
 3906     if (parseToken(AsmToken::Comma, "expected comma before register number in "
 3919     if (parseToken(AsmToken::Comma,
 3932     if (parseToken(AsmToken::Comma, "expected comma before register number in "
 3936     if (parseToken(AsmToken::Comma,
 3952     if (parseToken(AsmToken::Comma, "expected comma before register number in "
 3957             AsmToken::Comma,
 3961     if (parseToken(AsmToken::Comma, "expected comma before base pointer offset "
 4013   if (parseToken(AsmToken::EndOfStatement, "Expected End of Statement"))
 4048   if (getLexer().is(AsmToken::Comma)) {
 4068   if (!parseOptionalToken(AsmToken::EndOfStatement)) {
 4071         parseToken(AsmToken::EndOfStatement))
 4096   if (getLexer().isNot(AsmToken::Integer)) {
 4111       parseToken(AsmToken::Comma, "unexpected token in directive") ||
 4135       parseToken(AsmToken::Comma, "unexpected token in directive") ||
 4179       parseToken(AsmToken::Comma, "unexpected token in directive") ||
 4193       parseToken(AsmToken::Comma, "unexpected token in directive") ||
 4236       parseToken(AsmToken::Comma, "unexpected token in directive") ||
 4296   while (getLexer().is(AsmToken::Comma)) {
 4322   if (parseToken(AsmToken::EndOfStatement,
 4346   if (getLexer().isNot(AsmToken::EndOfStatement))
 4356   if (parseToken(AsmToken::EndOfStatement,
 4371   if (getLexer().is(AsmToken::Comma))
 4375   while (getLexer().isNot(AsmToken::EndOfStatement)) {
 4392     if (Lexer.is(AsmToken::Colon)) {
 4412     if (getLexer().is(AsmToken::Equal)) {
 4428     if (getLexer().is(AsmToken::Comma))
 4436   AsmToken EndToken, StartToken = getTok();
 4441     while (Lexer.is(AsmToken::Error)) {
 4446     if (getLexer().is(AsmToken::Eof))
 4450     if (getLexer().is(AsmToken::Identifier)) {
 4456           if (getLexer().isNot(AsmToken::EndOfStatement))
 4595   if (parseToken(AsmToken::EndOfStatement,
 4617   if (getLexer().isNot(AsmToken::EndOfStatement))
 4641       parseToken(AsmToken::EndOfStatement,
 4662       parseToken(AsmToken::EndOfStatement, "unexpected token after expression "
 4687   if (!parseOptionalToken(AsmToken::EndOfStatement)) {
 4690         parseToken(AsmToken::EndOfStatement,
 4704       parseToken(AsmToken::EndOfStatement,
 4721   if (parseOptionalToken(AsmToken::Comma))
 4724   if (parseToken(AsmToken::EndOfStatement))
 4746   if (parseToken(AsmToken::Comma,
 4768   if (parseToken(AsmToken::EndOfStatement,
 4788   if (parseToken(AsmToken::Comma,
 4796   if (parseToken(AsmToken::EndOfStatement,
 4820   if (parseToken(AsmToken::EndOfStatement,
 4891   if (getLexer().isNot(AsmToken::Comma))
 4902   if (getLexer().is(AsmToken::Comma)) {
 4921   if (parseToken(AsmToken::EndOfStatement,
 4959   if (parseToken(AsmToken::EndOfStatement,
 4979   if (check(getTok().isNot(AsmToken::String),
 4982       check(getTok().isNot(AsmToken::EndOfStatement),
 4999   if (check(getTok().isNot(AsmToken::String),
 5007   if (parseOptionalToken(AsmToken::Comma)) {
 5010     if (getTok().isNot(AsmToken::Comma)) {
 5014     if (parseOptionalToken(AsmToken::Comma)) {
 5021   if (parseToken(AsmToken::EndOfStatement,
 5044         parseToken(AsmToken::EndOfStatement,
 5089     if (parseToken(AsmToken::EndOfStatement,
 5112     if (parseToken(AsmToken::Comma, "unexpected token in '.ifc' directive"))
 5117     if (parseToken(AsmToken::EndOfStatement,
 5131   if (Lexer.isNot(AsmToken::String)) {
 5140   if (Lexer.isNot(AsmToken::Comma)) {
 5149   if (Lexer.isNot(AsmToken::String)) {
 5177         parseToken(AsmToken::EndOfStatement, "unexpected token in '.ifdef'"))
 5212     if (parseToken(AsmToken::EndOfStatement,
 5226   if (parseToken(AsmToken::EndOfStatement,
 5249   if (parseToken(AsmToken::EndOfStatement,
 5253   while (Lexer.isNot(AsmToken::Eof))
 5274   if (Lexer.isNot(AsmToken::EndOfStatement)) {
 5275     if (Lexer.isNot(AsmToken::String))
 5297   if (!parseOptionalToken(AsmToken::EndOfStatement)) {
 5298     if (Lexer.isNot(AsmToken::String))
 5303     if (parseToken(AsmToken::EndOfStatement,
 5314   if (parseToken(AsmToken::EndOfStatement,
 5492   AsmToken EndToken, StartToken = getTok();
 5497     if (getLexer().is(AsmToken::Eof)) {
 5502     if (Lexer.is(AsmToken::Identifier) &&
 5511     if (Lexer.is(AsmToken::Identifier) && getTok().getIdentifier() == ".endr") {
 5515         if (Lexer.isNot(AsmToken::EndOfStatement)) {
 5571       parseToken(AsmToken::EndOfStatement,
 5601       parseToken(AsmToken::Comma, "expected comma in '.irp' directive") ||
 5603       parseToken(AsmToken::EndOfStatement, "expected End of Statement"))
 5636       parseToken(AsmToken::Comma, "expected comma in '.irpc' directive") ||
 5644   if (parseToken(AsmToken::EndOfStatement, "expected end of statement"))
 5660     Arg.emplace_back(AsmToken::Identifier, Values.slice(I, I + 1));
 5719   const AsmToken StrTok = getTok();
 5721   if (StrTok.isNot(AsmToken::String) || StrTok.getString().front() != '"')
 5723   if (parseToken(AsmToken::EndOfStatement, "expected end of statement"))
 5789   while (getLexer().isNot(AsmToken::Eof)) {
 6036   if (Parser.parseToken(AsmToken::EndOfStatement))
lib/MC/MCParser/COFFAsmParser.cpp
  278   if (getLexer().isNot(AsmToken::EndOfStatement)) {
  289       if (getLexer().is(AsmToken::EndOfStatement))
  292       if (getLexer().isNot(AsmToken::Comma))
  313   if (getLexer().isNot(AsmToken::EndOfStatement))
  324   if (!getLexer().is(AsmToken::Identifier))
  357   if (getLexer().is(AsmToken::Comma)) {
  360     if (getLexer().isNot(AsmToken::String))
  372   if (getLexer().is(AsmToken::Comma)) {
  378     if (!getLexer().is(AsmToken::Identifier))
  385     if (getLexer().isNot(AsmToken::Comma))
  393   if (getLexer().isNot(AsmToken::EndOfStatement))
  425   if (getLexer().isNot(AsmToken::EndOfStatement))
  438   if (getLexer().isNot(AsmToken::EndOfStatement))
  459   if (getLexer().is(AsmToken::Plus)) {
  465   if (getLexer().isNot(AsmToken::EndOfStatement))
  489     if (getLexer().is(AsmToken::Plus) || getLexer().is(AsmToken::Minus)) {
  489     if (getLexer().is(AsmToken::Plus) || getLexer().is(AsmToken::Minus)) {
  517   if (getLexer().isNot(AsmToken::EndOfStatement))
  532   if (getLexer().isNot(AsmToken::EndOfStatement))
  547   if (getLexer().isNot(AsmToken::EndOfStatement))
  583   if (getLexer().is(AsmToken::Identifier))
  599   if (getLexer().isNot(AsmToken::EndOfStatement))
  610   if (getLexer().isNot(AsmToken::EndOfStatement))
  643   if (getLexer().isNot(AsmToken::Comma))
  649   if (getLexer().is(AsmToken::Comma)) {
  654   if (getLexer().isNot(AsmToken::EndOfStatement))
  675   if (getLexer().isNot(AsmToken::EndOfStatement))
  691   if (getLexer().isNot(AsmToken::At))
lib/MC/MCParser/DarwinAsmParser.cpp
  476   if (getLexer().isNot(AsmToken::EndOfStatement))
  530   if (getLexer().isNot(AsmToken::Comma))
  538   if (getLexer().isNot(AsmToken::EndOfStatement))
  575   if (getLexer().isNot(AsmToken::EndOfStatement))
  588   if (getLexer().isNot(AsmToken::String))
  593   if (getLexer().isNot(AsmToken::EndOfStatement))
  611     if (getLexer().isNot(AsmToken::String))
  620     if (getLexer().is(AsmToken::EndOfStatement))
  623     if (getLexer().isNot(AsmToken::Comma))
  642   if (getLexer().isNot(AsmToken::Comma))
  650   if (getLexer().isNot(AsmToken::EndOfStatement))
  672   if (!getLexer().is(AsmToken::Comma))
  684   if (getLexer().isNot(AsmToken::EndOfStatement))
  765   if (getLexer().isNot(AsmToken::EndOfStatement))
  804   if (getLexer().isNot(AsmToken::EndOfStatement))
  817   if (getLexer().isNot(AsmToken::EndOfStatement))
  838   if (getLexer().isNot(AsmToken::Comma))
  849   if (getLexer().is(AsmToken::Comma)) {
  856   if (getLexer().isNot(AsmToken::EndOfStatement))
  890   if (getLexer().isNot(AsmToken::Comma))
  902   if (getLexer().is(AsmToken::EndOfStatement)) {
  911   if (getLexer().isNot(AsmToken::Comma))
  923   if (getLexer().isNot(AsmToken::Comma))
  934   if (getLexer().is(AsmToken::Comma)) {
  941   if (getLexer().isNot(AsmToken::EndOfStatement))
  974   if (getLexer().is(AsmToken::EndOfStatement)) {
  999   if (getLexer().isNot(AsmToken::EndOfStatement))
 1007 static bool isSDKVersionToken(const AsmToken &Tok) {
 1008   return Tok.is(AsmToken::Identifier) && Tok.getIdentifier() == "sdk_version";
 1016   if (getLexer().isNot(AsmToken::Integer))
 1024   if (getLexer().isNot(AsmToken::Comma))
 1029   if (getLexer().isNot(AsmToken::Integer))
 1045   if (getLexer().isNot(AsmToken::Integer))
 1065   if (getLexer().is(AsmToken::EndOfStatement) ||
 1068   if (getLexer().isNot(AsmToken::Comma))
 1084   if (getLexer().is(AsmToken::Comma)) {
 1135   if (parseToken(AsmToken::EndOfStatement))
 1177   if (getLexer().isNot(AsmToken::Comma))
 1191   if (parseToken(AsmToken::EndOfStatement))
lib/MC/MCParser/ELFAsmParser.cpp
  178   if (getLexer().isNot(AsmToken::EndOfStatement)) {
  189       if (getLexer().is(AsmToken::EndOfStatement))
  192       if (getLexer().isNot(AsmToken::Comma))
  205   if (getLexer().isNot(AsmToken::EndOfStatement)) {
  223   if (getLexer().isNot(AsmToken::Comma))
  231   if (getLexer().isNot(AsmToken::EndOfStatement))
  245   if (getLexer().is(AsmToken::String)) {
  253     if (getLexer().is(AsmToken::Comma) ||
  254       getLexer().is(AsmToken::EndOfStatement))
  258     if (getLexer().is(AsmToken::String)) {
  261     } else if (getLexer().is(AsmToken::Identifier)) {
  342   while (getLexer().is(AsmToken::Hash)) {
  345     if (!getLexer().is(AsmToken::Identifier))
  362     if (!getLexer().is(AsmToken::Comma))
  393   if (L.isNot(AsmToken::Comma))
  396   if (L.isNot(AsmToken::At) && L.isNot(AsmToken::Percent) &&
  396   if (L.isNot(AsmToken::At) && L.isNot(AsmToken::Percent) &&
  397       L.isNot(AsmToken::String)) {
  403   if (!L.is(AsmToken::String))
  405   if (L.is(AsmToken::Integer)) {
  414   if (getLexer().isNot(AsmToken::Comma))
  426   if (L.isNot(AsmToken::Comma))
  429   if (L.is(AsmToken::Integer)) {
  435   if (L.is(AsmToken::Comma)) {
  448   if (L.isNot(AsmToken::Comma))
  462   if (L.isNot(AsmToken::Comma))
  470   if (L.isNot(AsmToken::Comma))
  517   if (getLexer().is(AsmToken::Comma)) {
  520     if (IsPush && getLexer().isNot(AsmToken::String)) {
  523       if (getLexer().isNot(AsmToken::Comma))
  530     if (getLexer().isNot(AsmToken::String)) {
  532           || getLexer().isNot(AsmToken::Hash))
  560       if (L.isNot(AsmToken::EndOfStatement))
  578   if (getLexer().isNot(AsmToken::EndOfStatement))
  699   if (getLexer().is(AsmToken::Comma))
  702   if (getLexer().isNot(AsmToken::Identifier) &&
  703       getLexer().isNot(AsmToken::Hash) &&
  704       getLexer().isNot(AsmToken::Percent) &&
  705       getLexer().isNot(AsmToken::String)) {
  709     else if (getLexer().isNot(AsmToken::At))
  714   if (getLexer().isNot(AsmToken::String) &&
  715       getLexer().isNot(AsmToken::Identifier))
  728   if (getLexer().isNot(AsmToken::EndOfStatement))
  740   if (getLexer().isNot(AsmToken::String))
  747   if (getLexer().isNot(AsmToken::EndOfStatement))
  762   if (getLexer().isNot(AsmToken::Comma))
  789   if (getLexer().isNot(AsmToken::String))
  819   if (getLexer().isNot(AsmToken::Comma))
  838   if (getLexer().isNot(AsmToken::EndOfStatement)) {
  843   if (getLexer().isNot(AsmToken::EndOfStatement))
  860   if (getLexer().isNot(AsmToken::Comma))
  869   if (getLexer().isNot(AsmToken::Comma))
  878   if (getLexer().isNot(AsmToken::EndOfStatement))
lib/MC/MCParser/MCAsmLexer.cpp
   18   CurTok.emplace_back(AsmToken::Space, StringRef());
   41   case AsmToken::Error:
   44   case AsmToken::Identifier:
   47   case AsmToken::Integer:
   50   case AsmToken::Real:
   53   case AsmToken::String:
   57   case AsmToken::Amp:                OS << "Amp"; break;
   58   case AsmToken::AmpAmp:             OS << "AmpAmp"; break;
   59   case AsmToken::At:                 OS << "At"; break;
   60   case AsmToken::BackSlash:          OS << "BackSlash"; break;
   61   case AsmToken::BigNum:             OS << "BigNum"; break;
   62   case AsmToken::Caret:              OS << "Caret"; break;
   63   case AsmToken::Colon:              OS << "Colon"; break;
   64   case AsmToken::Comma:              OS << "Comma"; break;
   65   case AsmToken::Comment:            OS << "Comment"; break;
   66   case AsmToken::Dollar:             OS << "Dollar"; break;
   67   case AsmToken::Dot:                OS << "Dot"; break;
   68   case AsmToken::EndOfStatement:     OS << "EndOfStatement"; break;
   69   case AsmToken::Eof:                OS << "Eof"; break;
   70   case AsmToken::Equal:              OS << "Equal"; break;
   71   case AsmToken::EqualEqual:         OS << "EqualEqual"; break;
   72   case AsmToken::Exclaim:            OS << "Exclaim"; break;
   73   case AsmToken::ExclaimEqual:       OS << "ExclaimEqual"; break;
   74   case AsmToken::Greater:            OS << "Greater"; break;
   75   case AsmToken::GreaterEqual:       OS << "GreaterEqual"; break;
   76   case AsmToken::GreaterGreater:     OS << "GreaterGreater"; break;
   77   case AsmToken::Hash:               OS << "Hash"; break;
   78   case AsmToken::HashDirective:      OS << "HashDirective"; break;
   79   case AsmToken::LBrac:              OS << "LBrac"; break;
   80   case AsmToken::LCurly:             OS << "LCurly"; break;
   81   case AsmToken::LParen:             OS << "LParen"; break;
   82   case AsmToken::Less:               OS << "Less"; break;
   83   case AsmToken::LessEqual:          OS << "LessEqual"; break;
   84   case AsmToken::LessGreater:        OS << "LessGreater"; break;
   85   case AsmToken::LessLess:           OS << "LessLess"; break;
   86   case AsmToken::Minus:              OS << "Minus"; break;
   87   case AsmToken::MinusGreater:       OS << "MinusGreater"; break;
   88   case AsmToken::Percent:            OS << "Percent"; break;
   89   case AsmToken::Pipe:               OS << "Pipe"; break;
   90   case AsmToken::PipePipe:           OS << "PipePipe"; break;
   91   case AsmToken::Plus:               OS << "Plus"; break;
   92   case AsmToken::RBrac:              OS << "RBrac"; break;
   93   case AsmToken::RCurly:             OS << "RCurly"; break;
   94   case AsmToken::RParen:             OS << "RParen"; break;
   95   case AsmToken::Slash:              OS << "Slash"; break;
   96   case AsmToken::Space:              OS << "Space"; break;
   97   case AsmToken::Star:               OS << "Star"; break;
   98   case AsmToken::Tilde:              OS << "Tilde"; break;
   99   case AsmToken::PercentCall16:      OS << "PercentCall16"; break;
  100   case AsmToken::PercentCall_Hi:     OS << "PercentCall_Hi"; break;
  101   case AsmToken::PercentCall_Lo:     OS << "PercentCall_Lo"; break;
  102   case AsmToken::PercentDtprel_Hi:   OS << "PercentDtprel_Hi"; break;
  103   case AsmToken::PercentDtprel_Lo:   OS << "PercentDtprel_Lo"; break;
  104   case AsmToken::PercentGot:         OS << "PercentGot"; break;
  105   case AsmToken::PercentGot_Disp:    OS << "PercentGot_Disp"; break;
  106   case AsmToken::PercentGot_Hi:      OS << "PercentGot_Hi"; break;
  107   case AsmToken::PercentGot_Lo:      OS << "PercentGot_Lo"; break;
  108   case AsmToken::PercentGot_Ofst:    OS << "PercentGot_Ofst"; break;
  109   case AsmToken::PercentGot_Page:    OS << "PercentGot_Page"; break;
  110   case AsmToken::PercentGottprel:    OS << "PercentGottprel"; break;
  111   case AsmToken::PercentGp_Rel:      OS << "PercentGp_Rel"; break;
  112   case AsmToken::PercentHi:          OS << "PercentHi"; break;
  113   case AsmToken::PercentHigher:      OS << "PercentHigher"; break;
  114   case AsmToken::PercentHighest:     OS << "PercentHighest"; break;
  115   case AsmToken::PercentLo:          OS << "PercentLo"; break;
  116   case AsmToken::PercentNeg:         OS << "PercentNeg"; break;
  117   case AsmToken::PercentPcrel_Hi:    OS << "PercentPcrel_Hi"; break;
  118   case AsmToken::PercentPcrel_Lo:    OS << "PercentPcrel_Lo"; break;
  119   case AsmToken::PercentTlsgd:       OS << "PercentTlsgd"; break;
  120   case AsmToken::PercentTlsldm:      OS << "PercentTlsldm"; break;
  121   case AsmToken::PercentTprel_Hi:    OS << "PercentTprel_Hi"; break;
  122   case AsmToken::PercentTprel_Lo:    OS << "PercentTprel_Lo"; break;
lib/MC/MCParser/MCAsmParser.cpp
   33 const AsmToken &MCAsmParser::getTok() const {
   43   if (getTok().getKind() != AsmToken::EndOfStatement)
   49 bool MCAsmParser::parseToken(AsmToken::TokenKind T, const Twine &Msg) {
   50   if (T == AsmToken::EndOfStatement)
   59   if (getTok().getKind() != AsmToken::Integer)
   66 bool MCAsmParser::parseOptionalToken(AsmToken::TokenKind T) {
   98   if (getTok().is(AsmToken::Error))
  105   if (getTok().is(AsmToken::Error))
  113   if (parseOptionalToken(AsmToken::EndOfStatement))
  118     if (parseOptionalToken(AsmToken::EndOfStatement))
  120     if (hasComma && parseToken(AsmToken::Comma))
lib/MC/MCParser/WasmAsmParser.cpp
   70   bool error(const StringRef &Msg, const AsmToken &Tok) {
   74   bool isNext(AsmToken::TokenKind Kind) {
   81   bool expect(AsmToken::TokenKind Kind, const char *KindName) {
  111     if (expect(AsmToken::Comma, ","))
  114     if (Lexer->isNot(AsmToken::String))
  147     if (expect(AsmToken::Comma, ",") || expect(AsmToken::At, "@") ||
  147     if (expect(AsmToken::Comma, ",") || expect(AsmToken::At, "@") ||
  148         expect(AsmToken::EndOfStatement, "eol"))
  163     if (expect(AsmToken::Comma, ","))
  168     if (expect(AsmToken::EndOfStatement, "eol"))
  179     if (!Lexer->is(AsmToken::Identifier))
  186     if (!(isNext(AsmToken::Comma) && isNext(AsmToken::At) &&
  186     if (!(isNext(AsmToken::Comma) && isNext(AsmToken::At) &&
  187           Lexer->is(AsmToken::Identifier)))
  199     return expect(AsmToken::EndOfStatement, "EOL");
  206     if (getLexer().isNot(AsmToken::String))
  210     if (getLexer().isNot(AsmToken::EndOfStatement))
  229     if (getLexer().isNot(AsmToken::EndOfStatement)) {
  236         if (getLexer().is(AsmToken::EndOfStatement))
  238         if (getLexer().isNot(AsmToken::Comma))
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
  263   bool ParseDirective(AsmToken DirectiveID) override;
 2298   const AsmToken &Tok = Parser.getTok();
 2299   if (Tok.isNot(AsmToken::Identifier))
 2318   if (Parser.getTok().isNot(AsmToken::Identifier)) {
 2348   const AsmToken &Tok = Parser.getTok();
 2371   if (parseOptionalToken(AsmToken::Hash) ||
 2372       Tok.is(AsmToken::Integer)) {
 2395   if (Tok.isNot(AsmToken::Identifier)) {
 2417   const AsmToken &Tok = Parser.getTok();
 2418   if (Tok.isNot(AsmToken::Identifier)) {
 2440   const AsmToken &Tok = Parser.getTok();
 2441   if (Tok.isNot(AsmToken::Identifier)) {
 2466   if (Parser.getTok().is(AsmToken::Hash)) {
 2518   if (getParser().getTok().is(AsmToken::LBrac))
 2521   if (getParser().getTok().is(AsmToken::Hash))
 2554   bool Hash = parseOptionalToken(AsmToken::Hash);
 2557   bool isNegative = parseOptionalToken(AsmToken::Minus);
 2559   const AsmToken &Tok = Parser.getTok();
 2560   if (!Tok.is(AsmToken::Real) && !Tok.is(AsmToken::Integer)) {
 2560   if (!Tok.is(AsmToken::Real) && !Tok.is(AsmToken::Integer)) {
 2568   if (Tok.is(AsmToken::Integer) && Tok.getString().startswith("0x")) {
 2607   if (Parser.getTok().is(AsmToken::Hash))
 2609   else if (Parser.getTok().isNot(AsmToken::Integer))
 2616   else if (Parser.getTok().isNot(AsmToken::Comma)) {
 2627   if (!Parser.getTok().is(AsmToken::Identifier) ||
 2636   parseOptionalToken(AsmToken::Hash);
 2638   if (Parser.getTok().isNot(AsmToken::Integer)) {
 2710   const AsmToken &Tok = Parser.getTok();
 2735   const AsmToken &Tok = Parser.getTok();
 2760   bool Hash = parseOptionalToken(AsmToken::Hash);
 2762   if (!Hash && getLexer().isNot(AsmToken::Integer)) {
 2781   if (!Parser.getTok().is(AsmToken::Integer) &&
 2782       !Parser.getTok().is(AsmToken::LParen) &&
 2783       !Parser.getTok().is(AsmToken::Identifier)) {
 2892   const AsmToken &Tok = Parser.getTok();
 2961   if (parseOptionalToken(AsmToken::Comma)) {
 2962     if (Tok.isNot(AsmToken::Identifier) || parseRegister(Operands))
 2972   if (parseToken(AsmToken::EndOfStatement, "unexpected token in argument list"))
 2981   const AsmToken &Tok = Parser.getTok();
 2983   if (Mnemonic == "tsb" && Tok.isNot(AsmToken::Identifier)) {
 2987   } else if (parseOptionalToken(AsmToken::Hash) || Tok.is(AsmToken::Integer)) {
 2987   } else if (parseOptionalToken(AsmToken::Hash) || Tok.is(AsmToken::Integer)) {
 3008   if (Tok.isNot(AsmToken::Identifier)) {
 3038   const AsmToken &Tok = Parser.getTok();
 3040   if (Tok.isNot(AsmToken::Identifier))
 3067   if (Parser.getTok().isNot(AsmToken::Identifier))
 3100   if (parseOptionalToken(AsmToken::LBrac)) {
 3112     if (parseToken(AsmToken::RBrac, "']' expected"))
 3130   const AsmToken &Tok = Parser.getTok();
 3132   if (Tok.isNot(AsmToken::Identifier))
 3181   if (Parser.getTok().isNot(AsmToken::Slash))
 3230   if (parseOptionalToken(AsmToken::Colon)) {
 3233     if (Parser.getTok().isNot(AsmToken::Identifier))
 3290     if (parseToken(AsmToken::Colon, "expect ':' after relocation specifier"))
 3308   if (!Parser.getTok().is(AsmToken::LCurly))
 3314     auto RegTok = Parser.getTok();
 3322     if (RegTok.isNot(AsmToken::Identifier) ||
 3333   auto LCurly = Parser.getTok();
 3351   if (parseOptionalToken(AsmToken::Minus)) {
 3376     while (parseOptionalToken(AsmToken::Comma)) {
 3402   if (parseToken(AsmToken::RCurly, "'}' expected"))
 3442   if (!parseOptionalToken(AsmToken::Comma)) {
 3448   parseOptionalToken(AsmToken::Hash);
 3450   if (getParser().getTok().isNot(AsmToken::Integer)) {
 3478   if (!ParseShiftExtend || getParser().getTok().isNot(AsmToken::Comma)) {
 3509   bool NextIsHash = Parser.getLexer().peekTok().is(AsmToken::Hash);
 3575   case AsmToken::LBrac: {
 3585   case AsmToken::LCurly:
 3587   case AsmToken::Identifier: {
 3617   case AsmToken::Integer:
 3618   case AsmToken::Real:
 3619   case AsmToken::Hash: {
 3623     parseOptionalToken(AsmToken::Hash);
 3627     if (Parser.getTok().is(AsmToken::Minus)) {
 3631       if (Parser.getLexer().peekTok().is(AsmToken::Real))
 3638     const AsmToken &Tok = Parser.getTok();
 3639     if (Tok.is(AsmToken::Real)) {
 3665   case AsmToken::Equal: {
 3767   if (Parser.getTok().is(AsmToken::Identifier) &&
 3835   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 3857       if (parseOptionalToken(AsmToken::RBrac))
 3861       if (parseOptionalToken(AsmToken::Exclaim))
 3866     } while (parseOptionalToken(AsmToken::Comma));
 3869   if (parseToken(AsmToken::EndOfStatement, "unexpected token in argument list"))
 5016 bool AArch64AsmParser::ParseDirective(AsmToken DirectiveID) {
 5114   if (parseToken(AsmToken::EndOfStatement))
 5168   if (parseToken(AsmToken::EndOfStatement,
 5212   if (parseToken(AsmToken::EndOfStatement))
 5274   if (getLexer().is(AsmToken::EndOfStatement))
 5300       parseToken(AsmToken::EndOfStatement))
 5319   if (getParser().getTok().isNot(AsmToken::Identifier)) {
 5320     if (getParser().getTok().isNot(AsmToken::Integer))
 5354     if (parseToken(AsmToken::Comma,
 5358   if (parseToken(AsmToken::EndOfStatement,
 5369   if (parseToken(AsmToken::EndOfStatement, "unexpected token in directive"))
 5428   if (parseToken(AsmToken::EndOfStatement,
 5443   if (getTok().isNot(AsmToken::Identifier))
 5447   if (parseToken(AsmToken::EndOfStatement))
 5453   if (parseToken(AsmToken::EndOfStatement, "unexpected token in directive"))
 5462   if (parseToken(AsmToken::EndOfStatement,
 5593   if (getParser().getTok().isNot(AsmToken::Identifier)) {
 5625   if (getParser().getTok().isNot(AsmToken::Comma)) {
 5685   if (!ParseShiftExtend || getParser().getTok().isNot(AsmToken::Comma)) {
 5718   const AsmToken &TokE = Parser.getTok();
 5719   bool IsHash = TokE.is(AsmToken::Hash);
 5721   if (!IsHash && TokE.isNot(AsmToken::Identifier))
lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
 1082   bool isRegister(const AsmToken &Token, const AsmToken &NextToken) const;
 1082   bool isRegister(const AsmToken &Token, const AsmToken &NextToken) const;
 1238   bool ParseDirective(AsmToken DirectiveID) override;
 1266   bool isOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const;
 1266   bool isOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const;
 1267   bool isRegOrOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const;
 1267   bool isRegOrOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const;
 1268   bool isNamedOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const;
 1268   bool isNamedOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const;
 1269   bool isOpcodeModifierWithVal(const AsmToken &Token, const AsmToken &NextToken) const;
 1269   bool isOpcodeModifierWithVal(const AsmToken &Token, const AsmToken &NextToken) const;
 1337   bool isId(const AsmToken &Token, const StringRef Id) const;
 1338   bool isToken(const AsmToken::TokenKind Kind) const;
 1340   bool trySkipId(const StringRef Id, const AsmToken::TokenKind Kind);
 1341   bool trySkipToken(const AsmToken::TokenKind Kind);
 1342   bool skipToken(const AsmToken::TokenKind Kind, const StringRef ErrMsg);
 1344   void peekTokens(MutableArrayRef<AsmToken> Tokens);
 1345   AsmToken::TokenKind getTokenKind() const;
 1349   AsmToken peekToken();
 1350   AsmToken getToken() const;
 2073 AMDGPUAsmParser::isRegister(const AsmToken &Token,
 2074                             const AsmToken &NextToken) const {
 2077   if (Token.is(AsmToken::LBrac))
 2080   if (!Token.is(AsmToken::Identifier))
 2097       if (NextToken.is(AsmToken::LBrac))
 2144   if (!trySkipToken(AsmToken::LBrac))
 2150   if (trySkipToken(AsmToken::Colon)) {
 2157   if (!trySkipToken(AsmToken::RBrac))
 2217   if (!trySkipToken(AsmToken::LBrac))
 2227   for (; trySkipToken(AsmToken::Comma); ) {
 2241   if (!trySkipToken(AsmToken::RBrac))
 2256   if (isToken(AsmToken::Identifier)) {
 2317   const auto &Tok = Parser.getTok();
 2343   const auto& Tok = getToken();
 2344   const auto& NextTok = peekToken();
 2345   bool IsReal = Tok.is(AsmToken::Real);
 2349   if (!IsReal && Tok.is(AsmToken::Minus) && NextTok.is(AsmToken::Real)) {
 2349   if (!IsReal && Tok.is(AsmToken::Minus) && NextTok.is(AsmToken::Real)) {
 2436 AMDGPUAsmParser::isNamedOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const {
 2436 AMDGPUAsmParser::isNamedOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const {
 2437   if (Token.is(AsmToken::Identifier) && NextToken.is(AsmToken::LParen)) {
 2437   if (Token.is(AsmToken::Identifier) && NextToken.is(AsmToken::LParen)) {
 2445 AMDGPUAsmParser::isOpcodeModifierWithVal(const AsmToken &Token, const AsmToken &NextToken) const {
 2445 AMDGPUAsmParser::isOpcodeModifierWithVal(const AsmToken &Token, const AsmToken &NextToken) const {
 2446   return Token.is(AsmToken::Identifier) && NextToken.is(AsmToken::Colon);
 2446   return Token.is(AsmToken::Identifier) && NextToken.is(AsmToken::Colon);
 2450 AMDGPUAsmParser::isOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const {
 2450 AMDGPUAsmParser::isOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const {
 2451   return isNamedOperandModifier(Token, NextToken) || Token.is(AsmToken::Pipe);
 2455 AMDGPUAsmParser::isRegOrOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const {
 2455 AMDGPUAsmParser::isRegOrOperandModifier(const AsmToken &Token, const AsmToken &NextToken) const {
 2477   AsmToken Tok = getToken();
 2478   AsmToken NextToken[2];
 2482          (Tok.is(AsmToken::Minus) && isRegOrOperandModifier(NextToken[0], NextToken[1])) ||
 2511   AsmToken NextToken[2];
 2514   if (isToken(AsmToken::Minus) &&
 2516        NextToken[0].is(AsmToken::Pipe) ||
 2533   if (isToken(AsmToken::Minus) && peekToken().is(AsmToken::Minus)) {
 2533   if (isToken(AsmToken::Minus) && peekToken().is(AsmToken::Minus)) {
 2546   if (Neg && !skipToken(AsmToken::LParen, "expected left paren after neg"))
 2550   if (Abs && !skipToken(AsmToken::LParen, "expected left paren after abs"))
 2554   SP3Abs = trySkipToken(AsmToken::Pipe);
 2570   if (SP3Abs && !skipToken(AsmToken::Pipe, "expected vertical bar"))
 2572   if (Abs && !skipToken(AsmToken::RParen, "expected closing parentheses"))
 2574   if (Neg && !skipToken(AsmToken::RParen, "expected closing parentheses"))
 2596   if (Sext && !skipToken(AsmToken::LParen, "expected left paren after sext"))
 2609   if (Sext && !skipToken(AsmToken::RParen, "expected closing parentheses"))
 3555   if (getLexer().isNot(AsmToken::Integer) && getLexer().isNot(AsmToken::Identifier)) {
 3555   if (getLexer().isNot(AsmToken::Integer) && getLexer().isNot(AsmToken::Identifier)) {
 3570   if (getLexer().isNot(AsmToken::Comma))
 3675     while (getLexer().is(AsmToken::EndOfStatement))
 3678     if (getLexer().isNot(AsmToken::Identifier))
 3955   if (getLexer().is(AsmToken::EndOfStatement)) {
 3966   if (getLexer().isNot(AsmToken::Comma))
 3973   if (getLexer().isNot(AsmToken::Comma))
 3977   if (getLexer().isNot(AsmToken::String))
 3983   if (getLexer().isNot(AsmToken::Comma))
 3987   if (getLexer().isNot(AsmToken::String))
 4063     while(getLexer().is(AsmToken::EndOfStatement))
 4066     if (getLexer().isNot(AsmToken::Identifier))
 4085   if (getLexer().isNot(AsmToken::Identifier))
 4166   while (!getLexer().is(AsmToken::Eof)) {
 4167     while (getLexer().is(AsmToken::Space)) {
 4172     if (getLexer().is(AsmToken::Identifier)) {
 4189   if (getLexer().is(AsmToken::Eof) && !FoundEnd) {
 4227     if (getLexer().isNot(AsmToken::Comma)) {
 4237     if (getLexer().isNot(AsmToken::Comma))
 4256   if (parseToken(AsmToken::Comma, "expected ','"))
 4271   if (getLexer().is(AsmToken::Comma)) {
 4286   if (parseToken(AsmToken::EndOfStatement,
 4298 bool AMDGPUAsmParser::ParseDirective(AsmToken DirectiveID) {
 4424       getLexer().is(AsmToken::EndOfStatement))
 4427   if (Mode == OperandMode_NSA && getLexer().is(AsmToken::LBrac)) {
 4437       if (getLexer().is(AsmToken::RBrac))
 4440       if (getLexer().isNot(AsmToken::Comma))
 4490   while (!getLexer().is(AsmToken::EndOfStatement)) {
 4497     if (getLexer().is(AsmToken::Comma))
 4505         while (!getLexer().is(AsmToken::EndOfStatement)) {
 4512         while (!getLexer().is(AsmToken::EndOfStatement)) {
 4529   if (!trySkipId(Prefix, AsmToken::Colon))
 4560   if (!trySkipId(Prefix, AsmToken::Colon))
 4563   if (!skipToken(AsmToken::LBrac, "expected a left square bracket"))
 4584     if (trySkipToken(AsmToken::RBrac))
 4592     if (!skipToken(AsmToken::Comma, "expected a comma"))
 4608   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 4610       case AsmToken::Identifier: {
 4655   if (getLexer().isNot(AsmToken::Identifier)) {
 4664   if (getLexer().isNot(AsmToken::Colon)) {
 4669   if (getLexer().isNot(AsmToken::Identifier)) {
 4880   if (!skipToken(AsmToken::Identifier, "expected a counter name") ||
 4881       !skipToken(AsmToken::LParen, "expected a left parenthesis"))
 4910   if (!skipToken(AsmToken::RParen, "expected a closing parenthesis"))
 4913   if (trySkipToken(AsmToken::Amp) || trySkipToken(AsmToken::Comma)) {
 4913   if (trySkipToken(AsmToken::Amp) || trySkipToken(AsmToken::Comma)) {
 4914     if (isToken(AsmToken::EndOfStatement)) {
 4931   if (isToken(AsmToken::Identifier) && peekToken().is(AsmToken::LParen)) {
 4931   if (isToken(AsmToken::Identifier) && peekToken().is(AsmToken::LParen)) {
 4932     while (parseCnt(Waitcnt) && !isToken(AsmToken::EndOfStatement));
 4957   if (isToken(AsmToken::Identifier) &&
 4965   if (trySkipToken(AsmToken::RParen))
 4970     skipToken(AsmToken::Comma, "expected a comma or a closing parenthesis") &&
 4972     skipToken(AsmToken::Comma, "expected a comma") &&
 4974     skipToken(AsmToken::RParen, "expected a closing parenthesis");
 5010   if (trySkipId("hwreg", AsmToken::LParen)) {
 5041   if (isToken(AsmToken::Identifier) && (Msg.Id = getMsgId(getTokenStr())) >= 0) {
 5048   if (trySkipToken(AsmToken::Comma)) {
 5050     if (isToken(AsmToken::Identifier) &&
 5057     if (trySkipToken(AsmToken::Comma)) {
 5064   return skipToken(AsmToken::RParen, "expected a closing parenthesis");
 5109   if (trySkipId("sendmsg", AsmToken::LParen)) {
 5135   if (getLexer().getKind() != AsmToken::Identifier)
 5156   if (getLexer().getKind() != AsmToken::Identifier)
 5288 AMDGPUAsmParser::isId(const AsmToken &Token, const StringRef Id) const {
 5289   return Token.is(AsmToken::Identifier) && Token.getString() == Id;
 5298 AMDGPUAsmParser::isToken(const AsmToken::TokenKind Kind) const {
 5312 AMDGPUAsmParser::trySkipId(const StringRef Id, const AsmToken::TokenKind Kind) {
 5322 AMDGPUAsmParser::trySkipToken(const AsmToken::TokenKind Kind) {
 5331 AMDGPUAsmParser::skipToken(const AsmToken::TokenKind Kind,
 5364   if (isToken(AsmToken::String)) {
 5374 AsmToken
 5379 AsmToken
 5385 AMDGPUAsmParser::peekTokens(MutableArrayRef<AsmToken> Tokens) {
 5389     Tokens[Idx] = AsmToken(AsmToken::Error, "");
 5392 AsmToken::TokenKind
 5435     if (!skipToken(AsmToken::Comma, "expected a comma")){
 5537   if (!skipToken(AsmToken::Comma, "expected a comma")) {
 5599   if (skipToken(AsmToken::LParen, "expected a left parentheses")) {
 5618     return Ok && skipToken(AsmToken::RParen, "expected a closing parentheses");
 5632     if (skipToken(AsmToken::Colon, "expected a colon")) {
 5663   if (trySkipToken(AsmToken::RParen)) {
 5693     if (trySkipToken(AsmToken::RParen))
 5695     if (!skipToken(AsmToken::Comma,
 5709   if (getLexer().getKind() == AsmToken::Identifier &&
 5711       getLexer().peekTok().is(AsmToken::LParen)) {
 6100         isToken(AsmToken::EndOfStatement))
 6103     trySkipToken(AsmToken::Comma);
 6446   if (getLexer().isNot(AsmToken::Identifier))
 6452   if (getLexer().isNot(AsmToken::Colon))
 6460   if (getLexer().is(AsmToken::Integer)) {
 6467   if (getLexer().isNot(AsmToken::Identifier))
 6490   if (getLexer().getKind() == AsmToken::Identifier) {
 6506   if (getLexer().isNot(AsmToken::Colon))
 6510   if (getLexer().isNot(AsmToken::LBrac))
 6520     if (getLexer().isNot(AsmToken::Comma))
 6530   if (getLexer().isNot(AsmToken::RBrac))
 6550   if (getLexer().getKind() == AsmToken::Identifier) {
 6588     if (getLexer().isNot(AsmToken::Colon))
 6594       if (getLexer().isNot(AsmToken::LBrac))
 6602         if (getLexer().isNot(AsmToken::Comma))
 6613       if (getLexer().isNot(AsmToken::RBrac))
lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.cpp
  121   if (MCParser.getLexer().isNot(AsmToken::Equal)) {
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
  633   bool ParseDirective(AsmToken DirectiveID) override;
 3880   const AsmToken &Tok = getParser().getTok();
 3893   const AsmToken &Tok = Parser.getTok();
 3894   if (Tok.isNot(AsmToken::Identifier)) return -1;
 3951   const AsmToken &Tok = Parser.getTok();
 3952   if (Tok.isNot(AsmToken::Identifier))
 3989     if (Parser.getTok().is(AsmToken::Hash) ||
 3990         Parser.getTok().is(AsmToken::Dollar)) {
 4018     } else if (Parser.getTok().is(AsmToken::Identifier)) {
 4060   const AsmToken &ExclaimTok = Parser.getTok();
 4061   if (ExclaimTok.is(AsmToken::Exclaim)) {
 4071   if (Parser.getTok().is(AsmToken::LBrac)) {
 4082     if (Parser.getTok().isNot(AsmToken::RBrac))
 4150   const AsmToken &Tok = Parser.getTok();
 4151   if (!Tok.is(AsmToken::Identifier))
 4170   const AsmToken &Tok = Parser.getTok();
 4171   if (Tok.isNot(AsmToken::Identifier))
 4192   const AsmToken &Tok = Parser.getTok();
 4193   if (Tok.isNot(AsmToken::Identifier))
 4213   if (Parser.getTok().isNot(AsmToken::LCurly))
 4231   if (Parser.getTok().isNot(AsmToken::RCurly))
 4284   if (Parser.getTok().isNot(AsmToken::LCurly))
 4327   while (Parser.getTok().is(AsmToken::Comma) ||
 4328          Parser.getTok().is(AsmToken::Minus)) {
 4329     if (Parser.getTok().is(AsmToken::Minus)) {
 4364     const AsmToken RegTok = Parser.getTok();
 4423   if (Parser.getTok().isNot(AsmToken::RCurly))
 4432   if (Parser.getTok().is(AsmToken::Caret)) {
 4445   if (Parser.getTok().is(AsmToken::LBrac)) {
 4447     if (Parser.getTok().is(AsmToken::RBrac)) {
 4457     if (Parser.getTok().is(AsmToken::Hash))
 4471     if (Parser.getTok().isNot(AsmToken::RBrac)) {
 4502   if (!hasMVE() && Parser.getTok().is(AsmToken::Identifier)) {
 4556   if (Parser.getTok().isNot(AsmToken::LCurly))
 4589   while (Parser.getTok().is(AsmToken::Comma) ||
 4590          Parser.getTok().is(AsmToken::Minus)) {
 4591     if (Parser.getTok().is(AsmToken::Minus)) {
 4716   if (Parser.getTok().isNot(AsmToken::RCurly)) {
 4754   const AsmToken &Tok = Parser.getTok();
 4757   if (Tok.is(AsmToken::Identifier)) {
 4788   } else if (Tok.is(AsmToken::Hash) ||
 4789              Tok.is(AsmToken::Dollar) ||
 4790              Tok.is(AsmToken::Integer)) {
 4791     if (Parser.getTok().isNot(AsmToken::Integer))
 4825   const AsmToken &Tok = Parser.getTok();
 4827   if (Tok.isNot(AsmToken::Identifier))
 4844   const AsmToken &Tok = Parser.getTok();
 4847   if (Tok.is(AsmToken::Identifier)) {
 4856   } else if (Tok.is(AsmToken::Hash) ||
 4857              Tok.is(AsmToken::Dollar) ||
 4858              Tok.is(AsmToken::Integer)) {
 4859     if (Parser.getTok().isNot(AsmToken::Integer))
 4896   const AsmToken &Tok = Parser.getTok();
 4897   if (!Tok.is(AsmToken::Identifier))
 4931   const AsmToken &Tok = Parser.getTok();
 4933   if (Tok.is(AsmToken::Integer)) {
 4944   if (!Tok.is(AsmToken::Identifier))
 5029   const AsmToken &Tok = Parser.getTok();
 5030   if (!Tok.is(AsmToken::Identifier))
 5048   const AsmToken &Tok = Parser.getTok();
 5049   if (Tok.isNot(AsmToken::Identifier)) {
 5063   if (Parser.getTok().isNot(AsmToken::Hash) &&
 5064       Parser.getTok().isNot(AsmToken::Dollar)) {
 5096   const AsmToken &Tok = Parser.getTok();
 5098   if (Tok.isNot(AsmToken::Identifier)) {
 5126   const AsmToken &Tok = Parser.getTok();
 5128   if (Tok.isNot(AsmToken::Identifier)) {
 5145   if (Parser.getTok().isNot(AsmToken::Hash) &&
 5146       Parser.getTok().isNot(AsmToken::Dollar)) {
 5197   const AsmToken &Tok = Parser.getTok();
 5199   if (Tok.isNot(AsmToken::Identifier))
 5207   if (Parser.getTok().isNot(AsmToken::Hash) &&
 5208       Parser.getTok().isNot(AsmToken::Dollar)) {
 5258   if (Parser.getTok().is(AsmToken::Identifier) ||
 5259       Parser.getTok().is(AsmToken::Colon))
 5263   if (Parser.getTok().is(AsmToken::Hash) ||
 5264       Parser.getTok().is(AsmToken::Dollar)) {
 5266     if (Lexer.peekTok().is(AsmToken::Colon))
 5287     if (Enc != -1 && Parser.getTok().is(AsmToken::EndOfStatement)) {
 5301     if (Parser.getTok().is(AsmToken::EndOfStatement)) {
 5313   if (Parser.getTok().isNot(AsmToken::Comma)) {
 5331   if (Parser.getTok().is(AsmToken::Hash) ||
 5332       Parser.getTok().is(AsmToken::Dollar))
 5363   if (Parser.getTok().isNot(AsmToken::Hash) &&
 5364       Parser.getTok().isNot(AsmToken::Dollar)) {
 5391   if (Parser.getTok().isNot(AsmToken::Comma)) {
 5396   if (Parser.getTok().isNot(AsmToken::Hash) &&
 5397       Parser.getTok().isNot(AsmToken::Dollar)) {
 5438   AsmToken Tok = Parser.getTok();
 5442   if (Tok.is(AsmToken::Plus)) {
 5445   } else if (Tok.is(AsmToken::Minus)) {
 5462   if (Parser.getTok().is(AsmToken::Comma)) {
 5491   AsmToken Tok = Parser.getTok();
 5495   if (Parser.getTok().is(AsmToken::Hash) ||
 5496       Parser.getTok().is(AsmToken::Dollar)) {
 5500     bool isNegative = Parser.getTok().is(AsmToken::Minus);
 5524   if (Tok.is(AsmToken::Plus)) {
 5527   } else if (Tok.is(AsmToken::Minus)) {
 5645   if (Parser.getTok().isNot(AsmToken::LBrac))
 5650   const AsmToken &BaseRegTok = Parser.getTok();
 5656   const AsmToken &Tok = Parser.getTok();
 5657   if (!Tok.is(AsmToken::Colon) && !Tok.is(AsmToken::Comma) &&
 5657   if (!Tok.is(AsmToken::Colon) && !Tok.is(AsmToken::Comma) &&
 5658       !Tok.is(AsmToken::RBrac))
 5661   if (Tok.is(AsmToken::RBrac)) {
 5671     if (Parser.getTok().is(AsmToken::Exclaim)) {
 5681   if (Tok.is(AsmToken::Comma)) {
 5686   if (Parser.getTok().is(AsmToken::Colon)) {
 5715     if (Parser.getTok().isNot(AsmToken::RBrac))
 5728     if (Parser.getTok().is(AsmToken::Exclaim)) {
 5739   if (Parser.getTok().is(AsmToken::Hash) ||
 5740       Parser.getTok().is(AsmToken::Dollar) ||
 5741       Parser.getTok().is(AsmToken::LParen) ||
 5742       Parser.getTok().is(AsmToken::Integer)) {
 5743     if (Parser.getTok().is(AsmToken::Hash) ||
 5744         Parser.getTok().is(AsmToken::Dollar))
 5748     bool isNegative = getParser().getTok().is(AsmToken::Minus);
 5768     if (Parser.getTok().isNot(AsmToken::RBrac))
 5781     if (Parser.getTok().is(AsmToken::Exclaim)) {
 5791   if (Parser.getTok().is(AsmToken::Minus)) {
 5794   } else if (Parser.getTok().is(AsmToken::Plus)) {
 5807   if (Parser.getTok().is(AsmToken::Comma)) {
 5814   if (Parser.getTok().isNot(AsmToken::RBrac))
 5825   if (Parser.getTok().is(AsmToken::Exclaim)) {
 5841   const AsmToken &Tok = Parser.getTok();
 5842   if (Tok.isNot(AsmToken::Identifier))
 5867     const AsmToken &HashTok = Parser.getTok();
 5868     if (HashTok.isNot(AsmToken::Hash) &&
 5869         HashTok.isNot(AsmToken::Dollar))
 5914   if (Parser.getTok().isNot(AsmToken::Hash) &&
 5915       Parser.getTok().isNot(AsmToken::Dollar))
 5942   if (Parser.getTok().is(AsmToken::Minus)) {
 5946   const AsmToken &Tok = Parser.getTok();
 5948   if (Tok.is(AsmToken::Real) && isVmovf) {
 5961   if (Tok.is(AsmToken::Integer) && isFconst) {
 6002   case AsmToken::Identifier: {
 6029   case AsmToken::LParen:  // parenthesized expressions like (_strcmp-4)
 6030   case AsmToken::Integer: // things like 1f and 2b as a branch targets
 6031   case AsmToken::String:  // quoted label names.
 6032   case AsmToken::Dot: {   // . as a branch target
 6043   case AsmToken::LBrac:
 6045   case AsmToken::LCurly:
 6047   case AsmToken::Dollar:
 6048   case AsmToken::Hash:
 6053     if (Parser.getTok().isNot(AsmToken::Colon)) {
 6054       bool isNegative = Parser.getTok().is(AsmToken::Minus);
 6071       if (Parser.getTok().is(AsmToken::Exclaim)) {
 6081   case AsmToken::Colon: {
 6100   case AsmToken::Equal: {
 6125   if (getLexer().is(AsmToken::Hash))
 6132   if (getLexer().isNot(AsmToken::Identifier)) {
 6192   if (getLexer().isNot(AsmToken::Colon)) {
 6762   if (Parser.getTok().is(AsmToken::Identifier) &&
 6927   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6933     while (parseOptionalToken(AsmToken::Comma)) {
 6941   if (parseToken(AsmToken::EndOfStatement, "unexpected token in argument list"))
10492 bool ARMAsmParser::ParseDirective(AsmToken DirectiveID) {
10593   if (parseToken(AsmToken::EndOfStatement, "unexpected token in directive") ||
10607   if (parseToken(AsmToken::EndOfStatement, "unexpected token in directive") ||
10641     if (Parser.getTok().is(AsmToken::Identifier) ||
10642         Parser.getTok().is(AsmToken::String)) {
10647       if (parseToken(AsmToken::EndOfStatement,
10654   if (parseToken(AsmToken::EndOfStatement,
10666   const AsmToken &Tok = Parser.getTok();
10667   if (Tok.isNot(AsmToken::Identifier)) {
10678       parseToken(AsmToken::EndOfStatement, "unexpected token in directive"))
10690   const AsmToken &Tok = Parser.getTok();
10691   if (Tok.isNot(AsmToken::Integer))
10700   if (parseToken(AsmToken::EndOfStatement, "unexpected token in directive"))
10731       parseToken(AsmToken::EndOfStatement,
10746   if (Parser.getTok().isNot(AsmToken::Identifier))
10750   if (parseToken(AsmToken::EndOfStatement,
10809   if (Parser.getTok().is(AsmToken::Identifier)) {
10831   if (Parser.parseToken(AsmToken::Comma, "comma expected"))
10865     if (Parser.parseToken(AsmToken::Comma, "comma expected"))
10870     if (Parser.getTok().isNot(AsmToken::String))
10877   if (Parser.parseToken(AsmToken::EndOfStatement,
10934   if (parseToken(AsmToken::EndOfStatement,
10956   if (parseToken(AsmToken::EndOfStatement,
10973   if (parseToken(AsmToken::EndOfStatement,
11004   if (Parser.getTok().isNot(AsmToken::Identifier))
11009   if (parseToken(AsmToken::EndOfStatement,
11042   if (parseToken(AsmToken::EndOfStatement,
11075       Parser.parseToken(AsmToken::Comma, "comma expected"))
11091   if (Parser.parseOptionalToken(AsmToken::Comma)) {
11092     if (Parser.getTok().isNot(AsmToken::Hash) &&
11093         Parser.getTok().isNot(AsmToken::Dollar))
11108   if (Parser.parseToken(AsmToken::EndOfStatement))
11127   if (Parser.getTok().isNot(AsmToken::Hash) &&
11128       Parser.getTok().isNot(AsmToken::Dollar))
11141   if (parseToken(AsmToken::EndOfStatement,
11164       parseToken(AsmToken::EndOfStatement, "unexpected token in directive"))
11237   if (parseOptionalToken(AsmToken::EndOfStatement))
11247   if (parseToken(AsmToken::EndOfStatement, "unexpected token in directive"))
11256   if (parseToken(AsmToken::EndOfStatement, "unexpected token in directive"))
11282       parseToken(AsmToken::EndOfStatement,
11338   if (Parser.parseToken(AsmToken::Comma, "expected comma"))
11346     if (check(getLexer().is(AsmToken::EndOfStatement) ||
11362   if (parseOptionalToken(AsmToken::EndOfStatement))
11376   if (getLexer().isNot(AsmToken::Identifier))
11384   if (parseToken(AsmToken::EndOfStatement,
11409   if (Parser.parseOptionalToken(AsmToken::Comma)) {
11410     if (Parser.parseToken(AsmToken::Hash, "expected #constant"))
11426   if (parseToken(AsmToken::EndOfStatement,
11440   if (getLexer().isNot(AsmToken::Identifier))
11451   if (parseToken(AsmToken::EndOfStatement))
11463   if (parseOptionalToken(AsmToken::EndOfStatement)) {
11484       parseToken(AsmToken::Comma, "expected comma after name '" + Name + "'"))
11755   if (getLexer().isNot(AsmToken::Identifier))
11762   if (parseToken(AsmToken::EndOfStatement,
lib/Target/AVR/AsmParser/AVRAsmParser.cpp
   60   bool ParseDirective(AsmToken DirectiveID) override;
  365   if (Parser.getTok().is(AsmToken::Identifier)) {
  367     if (Parser.getLexer().peekTok().is(AsmToken::Colon)) {
  371       if (Parser.getTok().is(AsmToken::Identifier)) {
  388   AsmToken const &T = Parser.getTok();
  401   if ((Parser.getTok().getKind() == AsmToken::Plus ||
  402        Parser.getTok().getKind() == AsmToken::Minus) &&
  403       Parser.getLexer().peekTok().getKind() == AsmToken::Identifier) {
  426   AsmToken tokens[2];
  430     if ((tokens[0].getKind() == AsmToken::Identifier &&
  431          tokens[1].getKind() == AsmToken::LParen) ||
  432         (tokens[0].getKind() == AsmToken::LParen &&
  433          tokens[1].getKind() == AsmToken::Minus)) {
  435       AsmToken::TokenKind CurTok = Parser.getLexer().getKind();
  436       if (CurTok == AsmToken::Minus ||
  437           tokens[1].getKind() == AsmToken::Minus) {
  445       if (CurTok == AsmToken::Minus || CurTok == AsmToken::Plus)
  445       if (CurTok == AsmToken::Minus || CurTok == AsmToken::Plus)
  451   if (Parser.getTok().getKind() != AsmToken::Identifier ||
  452       Parser.getLexer().peekTok().getKind() != AsmToken::LParen) {
  463         Parser.getTok().getKind() == AsmToken::Identifier) {
  473   if (tokens[1].getKind() == AsmToken::Minus ||
  474       tokens[1].getKind() == AsmToken::Plus) {
  484   if (tokens[1].getKind() == AsmToken::Minus ||
  485       tokens[1].getKind() == AsmToken::Plus) {
  510   case AsmToken::Identifier:
  517   case AsmToken::LParen:
  518   case AsmToken::Integer:
  519   case AsmToken::Dot:
  521   case AsmToken::Plus:
  522   case AsmToken::Minus: {
  526     case AsmToken::Integer:
  527     case AsmToken::BigNum:
  528     case AsmToken::Identifier:
  529     case AsmToken::Real:
  590   if (getLexer().is(AsmToken::Comma)) {
  603   while (getLexer().isNot(AsmToken::EndOfStatement)) {
  631 bool AVRAsmParser::ParseDirective(llvm::AsmToken DirectiveID) {
  647   AsmToken Tokens[2];
  649   if (ReadCount == 2 && Parser.getTok().getKind() == AsmToken::Identifier &&
  650       Tokens[0].getKind() == AsmToken::Minus &&
  651       Tokens[1].getKind() == AsmToken::Identifier) {
  658   if (Parser.getTok().getKind() == AsmToken::Identifier &&
  659       Parser.getLexer().peekTok().getKind() == AsmToken::LParen) {
lib/Target/BPF/AsmParser/BPFAsmParser.cpp
   46   bool ParseDirective(AsmToken DirectiveID) override;
  325   const AsmToken &Tok = getParser().getTok();
  343   if (getLexer().getKind() == AsmToken::Identifier) {
  356   case AsmToken::Minus:
  357   case AsmToken::Plus: {
  358     if (getLexer().peekTok().is(AsmToken::Integer))
  363   case AsmToken::Equal:
  364   case AsmToken::Greater:
  365   case AsmToken::Less:
  366   case AsmToken::Pipe:
  367   case AsmToken::Star:
  368   case AsmToken::LParen:
  369   case AsmToken::RParen:
  370   case AsmToken::LBrac:
  371   case AsmToken::RBrac:
  372   case AsmToken::Slash:
  373   case AsmToken::Amp:
  374   case AsmToken::Percent:
  375   case AsmToken::Caret: {
  383   case AsmToken::EqualEqual:
  384   case AsmToken::ExclaimEqual:
  385   case AsmToken::GreaterEqual:
  386   case AsmToken::GreaterGreater:
  387   case AsmToken::LessEqual:
  388   case AsmToken::LessLess: {
  412   case AsmToken::Identifier:
  429   case AsmToken::LParen:
  430   case AsmToken::Minus:
  431   case AsmToken::Plus:
  432   case AsmToken::Integer:
  433   case AsmToken::String:
  434   case AsmToken::Identifier:
  465   while (!getLexer().is(AsmToken::EndOfStatement)) {
  481   if (getLexer().isNot(AsmToken::EndOfStatement)) {
  494 bool BPFAsmParser::ParseDirective(AsmToken DirectiveID) { return true; }
lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp
  112   bool isLabel(AsmToken &Token) override;
  185   bool ParseInstruction(ParseInstructionInfo &Info, StringRef Name, AsmToken ID,
  188   bool ParseDirective(AsmToken DirectiveID) override;
  501     if (!Parser.getTok().is(AsmToken::Colon))
  600   while (!Lexer.is(AsmToken::RCurly))
  653 bool HexagonAsmParser::ParseDirective(AsmToken DirectiveID) {
  677   if (getLexer().isNot(AsmToken::EndOfStatement))
  698   if (getLexer().isNot(AsmToken::EndOfStatement)) {
  740   if (getLexer().isNot(AsmToken::Comma))
  751   if (getLexer().is(AsmToken::Comma)) {
  761   if (getLexer().is(AsmToken::Comma)) {
  774   if (getLexer().isNot(AsmToken::EndOfStatement))
  846   AsmToken const &Token = getParser().getTok();
  886           const AsmToken &MaybeDotNew = Lexer.getTok();
  887           if (MaybeDotNew.is(AsmToken::TokenKind::Identifier) &&
  904           const AsmToken &MaybeDotNew = Lexer.getTok();
  905           if (MaybeDotNew.is(AsmToken::TokenKind::Identifier) &&
  921 bool HexagonAsmParser::isLabel(AsmToken &Token) {
  923   AsmToken const &Second = Lexer.getTok();
  924   AsmToken Third = Lexer.peekTok();
  926   if (Token.is(AsmToken::TokenKind::LCurly) ||
  927       Token.is(AsmToken::TokenKind::RCurly))
  930   if (String.lower() == "vwhist256" && Second.is(AsmToken::Colon) &&
  933   if (!Token.is(AsmToken::TokenKind::Identifier))
  964   SmallVector<AsmToken, 5> Lookahead;
  966   bool Again = Lexer.is(AsmToken::Identifier);
  969     AsmToken const &Token = Lexer.getTok();
  978     bool Type = Lexer.is(AsmToken::Identifier) || Lexer.is(AsmToken::Dot) ||
  978     bool Type = Lexer.is(AsmToken::Identifier) || Lexer.is(AsmToken::Dot) ||
  979                 Lexer.is(AsmToken::Integer) || Lexer.is(AsmToken::Real) ||
  979                 Lexer.is(AsmToken::Integer) || Lexer.is(AsmToken::Real) ||
  980                 Lexer.is(AsmToken::Colon);
  982         Lexer.is(AsmToken::Colon) || Lookahead.back().is(AsmToken::Colon);
  982         Lexer.is(AsmToken::Colon) || Lookahead.back().is(AsmToken::Colon);
 1002       Lexer.UnLex(AsmToken(AsmToken::Identifier, DotString));
 1015     } while (!Lookahead.empty () && !Lexer.is(AsmToken::Colon));
 1033     if (!getLexer().getTok().is(AsmToken::Colon))
 1044   SmallVector<AsmToken, 4> Tokens;
 1052     case AsmToken::TokenKind::Hash:
 1054         if ((Tokens.end() - 2)->getKind() == AsmToken::TokenKind::Plus) {
 1056                         AsmToken(AsmToken::TokenKind::Comma, Comma));
 1060     case AsmToken::TokenKind::RCurly:
 1061     case AsmToken::TokenKind::EndOfStatement:
 1062     case AsmToken::TokenKind::Eof:
 1097     AsmToken const &Token = Parser.getTok();
 1099     case AsmToken::Eof:
 1100     case AsmToken::EndOfStatement: {
 1104     case AsmToken::LCurly: {
 1112     case AsmToken::RCurly: {
 1120     case AsmToken::Comma: {
 1124     case AsmToken::EqualEqual:
 1125     case AsmToken::ExclaimEqual:
 1126     case AsmToken::GreaterEqual:
 1127     case AsmToken::GreaterGreater:
 1128     case AsmToken::LessEqual:
 1129     case AsmToken::LessLess: {
 1137     case AsmToken::Hash: {
 1148       if (Lexer.is(AsmToken::Hash)) {
 1153       AsmToken const &Token = Parser.getTok();
 1154       if (Token.is(AsmToken::Identifier)) {
 1162           AsmToken LParen = Lexer.peekTok();
 1163           if (!LParen.is(AsmToken::LParen)) {
 1217                                         StringRef Name, AsmToken ID,
lib/Target/Lanai/AsmParser/LanaiAsmParser.cpp
   64   bool ParseDirective(AsmToken DirectiveID) override;
  648 bool LanaiAsmParser::ParseDirective(AsmToken /*DirectiveId*/) { return true; }
  696   if (Lexer.getKind() == AsmToken::Percent)
  698   if (Lexer.getKind() == AsmToken::Identifier) {
  710   const AsmToken &Tok = getParser().getTok();
  725   if (Lexer.getKind() != AsmToken::Identifier)
  741     if (Lexer.getKind() != AsmToken::LParen) {
  753   if (Lexer.getKind() == AsmToken::Plus && Parser.parseExpression(RHS))
  758     if (Lexer.getKind() != AsmToken::RParen) {
  783   case AsmToken::Identifier:
  785   case AsmToken::Plus:
  786   case AsmToken::Minus:
  787   case AsmToken::Integer:
  788   case AsmToken::Dot:
  824     if (Lexer.is(AsmToken::Minus))
  826     else if (Lexer.is(AsmToken::Plus))
  834   } else if (Lexer.is(AsmToken::Star)) {
  895   if (Lexer.isNot(AsmToken::LBrac)) {
  917       if ((Op = parseImmediate()) && Lexer.is(AsmToken::RBrac)) {
  949   if (Lexer.is(AsmToken::RBrac)) {
  970     if (!BaseReg || Lexer.isNot(AsmToken::RBrac)) {
 1166   if (Lexer.is(AsmToken::EndOfStatement))
 1175   if (Lexer.is(AsmToken::EndOfStatement) && Name == "st" &&
 1188   if (Lexer.is(AsmToken::EndOfStatement) && Name.startswith("bt") &&
 1195   while (Lexer.isNot(AsmToken::EndOfStatement) && Lexer.is(AsmToken::Comma)) {
 1195   while (Lexer.isNot(AsmToken::EndOfStatement) && Lexer.is(AsmToken::Comma)) {
lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp
   53   bool ParseDirective(AsmToken DirectiveID) override;
   54   bool ParseDirectiveRefSym(AsmToken DirectiveID);
  291   if (getLexer().getKind() == AsmToken::Identifier) {
  300     AsmToken const &T = getParser().getTok();
  347   if (getLexer().getKind() == AsmToken::Dollar)
  363   if (getLexer().isNot(AsmToken::EndOfStatement)) {
  387   if (getLexer().is(AsmToken::EndOfStatement))
  395   if (getLexer().is(AsmToken::Comma)) {
  401   if (getLexer().isNot(AsmToken::EndOfStatement)) {
  411 bool MSP430AsmParser::ParseDirectiveRefSym(AsmToken DirectiveID) {
  421 bool MSP430AsmParser::ParseDirective(AsmToken DirectiveID) {
  438     case AsmToken::Identifier: {
  448     case AsmToken::Integer:
  449     case AsmToken::Plus:
  450     case AsmToken::Minus: {
  458         if (getLexer().getKind() == AsmToken::LParen) {
  463           if (getLexer().getKind() != AsmToken::RParen)
  474     case AsmToken::Amp: {
  487     case AsmToken::At: {
  495       if (getLexer().getKind() == AsmToken::Plus) {
  507     case AsmToken::Hash:
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
  156   StringMap<AsmToken> RegisterSets;
  189   bool ParseDirective(AsmToken DirectiveID) override;
  196                                                      const AsmToken &Token,
  696                                       AsmToken::TokenKind OperatorToken,
  702     case AsmToken::PercentCall16:
  704     case AsmToken::PercentCall_Hi:
  706     case AsmToken::PercentCall_Lo:
  708     case AsmToken::PercentDtprel_Hi:
  710     case AsmToken::PercentDtprel_Lo:
  712     case AsmToken::PercentGot:
  714     case AsmToken::PercentGot_Disp:
  716     case AsmToken::PercentGot_Hi:
  718     case AsmToken::PercentGot_Lo:
  720     case AsmToken::PercentGot_Ofst:
  722     case AsmToken::PercentGot_Page:
  724     case AsmToken::PercentGottprel:
  726     case AsmToken::PercentGp_Rel:
  728     case AsmToken::PercentHi:
  730     case AsmToken::PercentHigher:
  732     case AsmToken::PercentHighest:
  734     case AsmToken::PercentLo:
  736     case AsmToken::PercentNeg:
  738     case AsmToken::PercentPcrel_Hi:
  740     case AsmToken::PercentPcrel_Lo:
  742     case AsmToken::PercentTlsgd:
  744     case AsmToken::PercentTlsldm:
  746     case AsmToken::PercentTprel_Hi:
  748     case AsmToken::PercentTprel_Lo:
 5854     AsmToken RegTok = getLexer().peekTok();
 6008   case AsmToken::Dollar: {
 6116   if (getLexer().getKind() == AsmToken::LParen) {
 6121   if (getLexer().getKind() != AsmToken::Dollar) {
 6125     const AsmToken &Tok = Parser.getTok(); // Get the next token.
 6126     if (Tok.isNot(AsmToken::LParen)) {
 6134       if (Tok.is(AsmToken::EndOfStatement)) {
 6152       case AsmToken::Plus:
 6156       case AsmToken::Minus:
 6160       case AsmToken::Star:
 6164       case AsmToken::Pipe:
 6168       case AsmToken::Amp:
 6172       case AsmToken::LessLess:
 6176       case AsmToken::GreaterGreater:
 6180       case AsmToken::Caret:
 6184       case AsmToken::Slash:
 6188       case AsmToken::Percent:
 6209   if (Parser.getTok().isNot(AsmToken::RParen)) {
 6347                                              const AsmToken &Token, SMLoc S) {
 6348   if (Token.is(AsmToken::Identifier)) {
 6354   } else if (Token.is(AsmToken::Integer)) {
 6376   auto Token = getLexer().peekTok(false);
 6385   auto Token = Parser.getTok();
 6389   if (Token.isNot(AsmToken::Dollar)) {
 6391     if (Token.is(AsmToken::Identifier)) {
 6440   if (Parser.getTok().is(AsmToken::Dollar)) {
 6466   if (Parser.getTok().isNot(AsmToken::Dollar))
 6521     if (Parser.getTok().is(AsmToken::Minus))
 6524     if (!Parser.getTok().isNot(AsmToken::Minus) &&
 6525         !Parser.getTok().isNot(AsmToken::Comma)) {
 6531     if (Parser.getTok().isNot(AsmToken::Dollar))
 6550   if (getLexer().is(AsmToken::LParen)) {
 6558     if (Parser.getTok().isNot(AsmToken::RParen)) {
 6578   if (getLexer().is(AsmToken::LBrac)) {
 6586     if (Parser.getTok().isNot(AsmToken::RBrac)) {
 6618   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6624     if (getLexer().is(AsmToken::LBrac) && parseBracketSuffix(Name, Operands))
 6628     while (getLexer().is(AsmToken::Comma)) {
 6636       if (getLexer().is(AsmToken::LBrac)) {
 6639       } else if (getLexer().is(AsmToken::LParen) &&
 6644   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6673   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6689   if (getLexer().is(AsmToken::EndOfStatement)) {
 6698   if (getLexer().isNot(AsmToken::Equal)) {
 6704   if (getLexer().isNot(AsmToken::Dollar)) {
 6705     if (getLexer().is(AsmToken::EndOfStatement)) {
 6717   const AsmToken &Reg = Parser.getTok();
 6718   if (Reg.is(AsmToken::Identifier)) {
 6720   } else if (Reg.is(AsmToken::Integer)) {
 6735   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6750   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6764   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6778   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6792   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6811   if (getLexer().isNot(AsmToken::EndOfStatement))
 6824   if (getLexer().isNot(AsmToken::EndOfStatement))
 6837   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6852   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6868   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6886   AsmToken Tok = Parser.getTok();
 6887   if (Tok.isNot(AsmToken::Equal)) {
 6897   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6910   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6924   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6939   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6955   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6972   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 6989   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 7006   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 7023   if (getLexer().isNot(AsmToken::EndOfStatement))
 7044   if (getLexer().isNot(AsmToken::EndOfStatement))
 7058   if (getLexer().isNot(AsmToken::EndOfStatement))
 7069   if (getLexer().isNot(AsmToken::EndOfStatement))
 7084   if (getLexer().isNot(AsmToken::Comma))
 7088   if (getLexer().is(AsmToken::Dollar) &&
 7089       getLexer().peekTok().is(AsmToken::Integer)) {
 7112   if (getLexer().isNot(AsmToken::EndOfStatement))
 7129   if (getLexer().isNot(AsmToken::Equal))
 7172   if (getLexer().isNot(AsmToken::EndOfStatement))
 7268   if (getLexer().isNot(AsmToken::Comma)) {
 7308   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 7337   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 7384   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 7475   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 7476     const AsmToken &Tok = Parser.getTok();
 7495   const AsmToken &Tok = getParser().getTok();
 7633   if (getLexer().isNot(AsmToken::EndOfStatement))
 7651   if (getLexer().isNot(AsmToken::EndOfStatement))
 7669   if (getLexer().isNot(AsmToken::EndOfStatement))
 7687   if (getLexer().isNot(AsmToken::EndOfStatement))
 7705   if (getLexer().isNot(AsmToken::EndOfStatement))
 7723   if (getLexer().isNot(AsmToken::EndOfStatement))
 7733   AsmToken Tok = Parser.getTok();
 7735   if (Tok.isNot(AsmToken::Identifier)) {
 7748     if (Parser.getTok().isNot(AsmToken::EndOfStatement)) {
 7761     if (Parser.getTok().isNot(AsmToken::EndOfStatement)) {
 7779   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 7796   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 7814   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 7870     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 7893     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 7914     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 7933     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 7952     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 7971     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 7990     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 8009     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 8028     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 8047     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 8066     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 8085   if (Lexer.isNot(AsmToken::Equal)) {
 8095   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 8119   if (Lexer.is(AsmToken::Identifier)) {
 8144   if (Lexer.is(AsmToken::Integer)) {
 8184 bool MipsAsmParser::ParseDirective(AsmToken DirectiveID) {
 8216     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 8217       if (getLexer().isNot(AsmToken::Comma)) {
 8242     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 8263     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 8301     if (Parser.getTok().is(AsmToken::Comma))
 8322     if (Parser.getTok().is(AsmToken::Comma))
 8345     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 8385     if (Parser.getTok().is(AsmToken::Comma))
 8407     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 8459     if (Parser.getTok().isNot(AsmToken::EndOfStatement)) {
 8504   if (getLexer().isNot(AsmToken::EndOfStatement)) {
lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
  121   bool ParseDirectiveWord(unsigned Size, AsmToken ID);
  122   bool ParseDirectiveTC(unsigned Size, AsmToken ID);
  159   bool ParseDirective(AsmToken DirectiveID) override;
 1174   if (getParser().getTok().is(AsmToken::Identifier)) {
 1213   const AsmToken &Tok = getParser().getTok();
 1401   case AsmToken::Identifier:
 1416       if (getLexer().isNot(AsmToken::LParen))
 1427     if (getLexer().isNot(AsmToken::RParen))
 1448   case AsmToken::Percent:
 1458   case AsmToken::Identifier:
 1459   case AsmToken::LParen:
 1460   case AsmToken::Plus:
 1461   case AsmToken::Minus:
 1462   case AsmToken::Integer:
 1463   case AsmToken::Dot:
 1464   case AsmToken::Dollar:
 1465   case AsmToken::Exclaim:
 1466   case AsmToken::Tilde:
 1497   if (TLSCall && getLexer().is(AsmToken::LParen)) {
 1504     if (getLexer().isNot(AsmToken::RParen))
 1513   if (!TLSCall && getLexer().is(AsmToken::LParen)) {
 1519     case AsmToken::Percent:
 1526     case AsmToken::Integer:
 1533    case AsmToken::Identifier:
 1547     if (parseToken(AsmToken::RParen, "missing ')'"))
 1562   if (parseOptionalToken(AsmToken::Plus)) {
 1567   if (parseOptionalToken(AsmToken::Minus)) {
 1592   if (parseOptionalToken(AsmToken::EndOfStatement))
 1599   while (!parseOptionalToken(AsmToken::EndOfStatement)) {
 1600     if (parseToken(AsmToken::Comma) || ParseOperand(Operands))
 1623 bool PPCAsmParser::ParseDirective(AsmToken DirectiveID) {
 1649 bool PPCAsmParser::ParseDirectiveWord(unsigned Size, AsmToken ID) {
 1674 bool PPCAsmParser::ParseDirectiveTC(unsigned Size, AsmToken ID) {
 1677   while (getLexer().isNot(AsmToken::EndOfStatement)
 1678          && getLexer().isNot(AsmToken::Comma))
 1680   if (parseToken(AsmToken::Comma))
 1694   if (Parser.getTok().isNot(AsmToken::Identifier) &&
 1695       Parser.getTok().isNot(AsmToken::String))
 1710   if (parseToken(AsmToken::EndOfStatement))
 1725   if (Parser.getTok().isNot(AsmToken::Identifier) &&
 1726       Parser.getTok().isNot(AsmToken::String))
 1741       parseToken(AsmToken::EndOfStatement))
 1752       parseToken(AsmToken::EndOfStatement))
 1773   if (parseToken(AsmToken::Comma) ||
 1775       parseToken(AsmToken::EndOfStatement))
lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
   75   bool ParseDirective(AsmToken DirectiveID) override;
  966   const AsmToken &Tok = getParser().getTok();
  983   AsmToken LParen;
  987   if (AllowParens && getLexer().is(AsmToken::LParen)) {
  988     AsmToken Buf[2];
  990     if (ReadCount == 2 && Buf[1].getKind() == AsmToken::RParen) {
 1002   case AsmToken::Identifier:
 1036   case AsmToken::LParen:
 1037   case AsmToken::Minus:
 1038   case AsmToken::Plus:
 1039   case AsmToken::Exclaim:
 1040   case AsmToken::Tilde:
 1041   case AsmToken::Integer:
 1042   case AsmToken::String: {
 1063   case AsmToken::Identifier: {
 1085   case AsmToken::Percent: {
 1104   case AsmToken::LParen:
 1105   case AsmToken::Dot:
 1106   case AsmToken::Minus:
 1107   case AsmToken::Plus:
 1108   case AsmToken::Exclaim:
 1109   case AsmToken::Tilde:
 1110   case AsmToken::Integer:
 1111   case AsmToken::String:
 1112   case AsmToken::Identifier:
 1116   case AsmToken::Percent:
 1129   if (getLexer().getKind() != AsmToken::Percent) {
 1136   if (getLexer().getKind() != AsmToken::Identifier) {
 1148   if (getLexer().getKind() != AsmToken::LParen) {
 1169   if (getLexer().getKind() != AsmToken::Identifier)
 1173   AsmToken Tok = getLexer().getTok();
 1200   case AsmToken::Plus:
 1203   case AsmToken::Minus:
 1221   if (getLexer().getKind() != AsmToken::Identifier)
 1225   if (getLexer().peekTok().getKind() != AsmToken::EndOfStatement)
 1253   if (getLexer().is(AsmToken::Identifier) &&
 1254       getLexer().peekTok().is(AsmToken::Comma))
 1262   if (getLexer().isNot(AsmToken::LParen)) {
 1275   if (getLexer().isNot(AsmToken::RParen)) {
 1307   if (getLexer().isNot(AsmToken::LParen)) {
 1325   if (getLexer().isNot(AsmToken::LParen)) {
 1337   if (getLexer().isNot(AsmToken::RParen)) {
 1373     if (getLexer().is(AsmToken::LParen))
 1405   if (getLexer().is(AsmToken::EndOfStatement))
 1414   while (getLexer().is(AsmToken::Comma)) {
 1425   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 1480 bool RISCVAsmParser::ParseDirective(AsmToken DirectiveID) {
 1496   AsmToken Tok = Parser.getTok();
 1498   if (Tok.isNot(AsmToken::Identifier))
 1508     if (Parser.getTok().isNot(AsmToken::EndOfStatement))
 1521     if (Parser.getTok().isNot(AsmToken::EndOfStatement))
 1535     if (Parser.getTok().isNot(AsmToken::EndOfStatement))
 1547     if (Parser.getTok().isNot(AsmToken::EndOfStatement))
 1559     if (Parser.getTok().isNot(AsmToken::EndOfStatement))
 1571     if (Parser.getTok().isNot(AsmToken::EndOfStatement))
lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
   73   bool ParseDirective(AsmToken DirectiveID) override;
   96   bool matchRegisterName(const AsmToken &Tok, unsigned &RegNo,
  633   const AsmToken &Tok = Parser.getTok();
  637   if (getLexer().getKind() != AsmToken::Percent)
  663   if (getLexer().isNot(AsmToken::EndOfStatement)) {
  665     if (getLexer().is(AsmToken::Comma)) {
  676     while (getLexer().is(AsmToken::Comma) || getLexer().is(AsmToken::Plus)) {
  676     while (getLexer().is(AsmToken::Comma) || getLexer().is(AsmToken::Plus)) {
  677       if (getLexer().is(AsmToken::Plus)) {
  689   if (getLexer().isNot(AsmToken::EndOfStatement)) {
  698 ParseDirective(AsmToken DirectiveID)
  730   case AsmToken::Comma:
  731   case AsmToken::RBrac:
  732   case AsmToken::EndOfStatement:
  736   case AsmToken:: Plus:
  739   case AsmToken::Minus:
  769   while (getLexer().getKind() == AsmToken::Hash) {
  791     if (getLexer().getKind() == AsmToken::Pipe)
  812   if (getLexer().is(AsmToken::LBrac)) {
  820       if (getLexer().getKind() != AsmToken::Percent)
  839     if (!getLexer().is(AsmToken::RBrac))
  847     if (getLexer().is(AsmToken::Integer)) {
  880   case AsmToken::Percent:
  928   case AsmToken::Minus:
  929   case AsmToken::Integer:
  930   case AsmToken::LParen:
  931   case AsmToken::Dot:
  936   case AsmToken::Identifier: {
  967   while (getLexer().is(AsmToken::Comma)) {
  970     if (!getLexer().is(AsmToken::Identifier))
  982 bool SparcAsmParser::matchRegisterName(const AsmToken &Tok, unsigned &RegNo,
  987   if (Tok.is(AsmToken::Identifier)) {
 1287   AsmToken Tok = Parser.getTok();
 1288   if (!Tok.is(AsmToken::Identifier))
 1299   if (Parser.getTok().getKind() != AsmToken::LParen)
lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
  450   bool ParseDirective(AsmToken DirectiveID) override;
  698   if (Parser.getTok().isNot(AsmToken::Percent))
  703   if (Parser.getTok().isNot(AsmToken::Identifier))
  760   if (Parser.getTok().isNot(AsmToken::Percent))
  777   if (Parser.getTok().is(AsmToken::Integer)) {
  847   if (getLexer().is(AsmToken::LParen)) {
  850     if (getLexer().is(AsmToken::Percent)) {
  862     if (getLexer().is(AsmToken::Comma)) {
  870     if (getLexer().isNot(AsmToken::RParen))
 1015 bool SystemZAsmParser::ParseDirective(AsmToken DirectiveID) {
 1058     if (getLexer().isNot(AsmToken::Comma))
 1152   if (getLexer().isNot(AsmToken::EndOfStatement)) {
 1159     while (getLexer().is(AsmToken::Comma)) {
 1165     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 1202   if (Parser.getTok().is(AsmToken::Percent)) {
 1324   if (AllowTLS && getLexer().is(AsmToken::Colon)) {
 1327     if (Parser.getTok().isNot(AsmToken::Identifier)) {
 1344     if (Parser.getTok().isNot(AsmToken::Colon)) {
 1350     if (Parser.getTok().isNot(AsmToken::Identifier)) {
lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
  218   bool error(const Twine &Msg, const AsmToken &Tok) {
  272   bool isNext(AsmToken::TokenKind Kind) {
  279   bool expect(AsmToken::TokenKind Kind, const char *KindName) {
  287     if (!Lexer.is(AsmToken::Identifier)) {
  330     while (Lexer.is(AsmToken::Identifier)) {
  336       if (!isNext(AsmToken::Comma))
  368     if (Lexer.isNot(AsmToken::Identifier))
  396       if (IsLoadStore && isNext(AsmToken::Colon)) {
  400         if (expect(AsmToken::Equal, "="))
  402         if (!Lexer.is(AsmToken::Integer))
  410         auto Tok = Lexer.getTok();
  438           Sep.getKind() != AsmToken::Slash)
  445       if (Id.getKind() != AsmToken::Identifier ||
  502     if (ExpectFuncType || (ExpectBlockType && Lexer.is(AsmToken::LParen))) {
  507       auto Loc = Parser.getTok();
  527     while (Lexer.isNot(AsmToken::EndOfStatement)) {
  530       case AsmToken::Identifier: {
  555       case AsmToken::Minus:
  557         if (Lexer.is(AsmToken::Integer)) {
  561         } else if(Lexer.is(AsmToken::Real)) {
  570       case AsmToken::Integer:
  575       case AsmToken::Real: {
  580       case AsmToken::LCurly: {
  584         if (!Lexer.is(AsmToken::RCurly))
  587             expect(AsmToken::Integer, "integer");
  588             if (!isNext(AsmToken::Comma))
  591         expect(AsmToken::RCurly, "}");
  598       if (Lexer.isNot(AsmToken::EndOfStatement)) {
  599         if (expect(AsmToken::Comma, ","))
  617     if (expect(AsmToken::LParen, "("))
  621     if (expect(AsmToken::RParen, ")"))
  623     if (expect(AsmToken::MinusGreater, "->"))
  625     if (expect(AsmToken::LParen, "("))
  629     if (expect(AsmToken::RParen, ")"))
  648   bool ParseDirective(AsmToken DirectiveID) override {
  667       if (expect(AsmToken::Comma, ","))
  669       auto TypeTok = Lexer.getTok();
  683       return expect(AsmToken::EndOfStatement, "EOL");
  712       return expect(AsmToken::EndOfStatement, "EOL");
  728       return expect(AsmToken::EndOfStatement, "EOL");
  740       return expect(AsmToken::EndOfStatement, "EOL");
  755       return expect(AsmToken::EndOfStatement, "EOL");
  764       return expect(AsmToken::EndOfStatement, "EOL");
lib/Target/X86/AsmParser/X86AsmParser.cpp
  988   bool ParseDirective(AsmToken DirectiveID) override;
 1092   const AsmToken &PercentTok = Parser.getTok();
 1097   if (!isParsingIntelSyntax() && PercentTok.is(AsmToken::Percent))
 1100   const AsmToken &Tok = Parser.getTok();
 1103   if (Tok.isNot(AsmToken::Identifier)) {
 1143     if (getLexer().isNot(AsmToken::LParen))
 1148     const AsmToken &IntTok = Parser.getTok();
 1149     if (IntTok.isNot(AsmToken::Integer))
 1163     if (getParser().Lex().isNot(AsmToken::RParen))
 1436   const AsmToken &Tok = Parser.getTok();
 1439   AsmToken::TokenKind PrevTK = AsmToken::Error;
 1439   AsmToken::TokenKind PrevTK = AsmToken::Error;
 1443     AsmToken::TokenKind TK = getLexer().getKind();
 1450     case AsmToken::EndOfStatement:
 1453     case AsmToken::Real:
 1459     case AsmToken::At:
 1460     case AsmToken::String:
 1461     case AsmToken::Identifier: {
 1467       if (Tok.is(AsmToken::Identifier) && !ParseRegister(Reg, IdentLoc, End)) {
 1499       if (Identifier.count('.') && PrevTK == AsmToken::RBrac) {
 1506       if (TK == AsmToken::At && Parser.parseIdentifier(Identifier))
 1514     case AsmToken::Integer: {
 1520       if (getLexer().getKind() == AsmToken::Identifier) {
 1546     case AsmToken::Plus:
 1550     case AsmToken::Minus:
 1554     case AsmToken::Tilde:   SM.onNot(); break;
 1555     case AsmToken::Star:    SM.onStar(); break;
 1556     case AsmToken::Slash:   SM.onDivide(); break;
 1557     case AsmToken::Percent: SM.onMod(); break;
 1558     case AsmToken::Pipe:    SM.onOr(); break;
 1559     case AsmToken::Caret:   SM.onXor(); break;
 1560     case AsmToken::Amp:     SM.onAnd(); break;
 1561     case AsmToken::LessLess:
 1563     case AsmToken::GreaterGreater:
 1565     case AsmToken::LBrac:
 1569     case AsmToken::RBrac:
 1573     case AsmToken::LParen:  SM.onLParen(); break;
 1574     case AsmToken::RParen:  SM.onRParen(); break;
 1631   const AsmToken &Tok = Parser.getTok();
 1672   const AsmToken &Tok = Parser.getTok();
 1675   if (Tok.isNot(AsmToken::Identifier))
 1687     if (!getLexer().is(AsmToken::Minus))
 1691     if (!getLexer().is(AsmToken::RCurly))
 1701     if (!getLexer().is(AsmToken::RCurly))
 1711   const AsmToken &Tok = getTok();
 1720   if (Tok.is(AsmToken::Real)) {
 1724   } else if (isParsingInlineAsm() && Tok.is(AsmToken::Identifier)) {
 1745   const AsmToken &Tok = Parser.getTok();
 1795   const AsmToken &Tok = Parser.getTok();
 1840     const AsmToken &Tok = Lex(); // Eat operand size (e.g., byte, word).
 1850   const AsmToken &Tok = Parser.getTok();
 1869   if (getLexer().is(AsmToken::LCurly))
 1874   if (Tok.is(AsmToken::Identifier) && !ParseRegister(RegNo, Start, End)) {
 1878     if (Tok.isNot(AsmToken::Colon))
 1962   case AsmToken::Dollar: {
 1970     if (check(getLexer().is(AsmToken::Percent), L,
 1977   case AsmToken::LCurly: {
 1990     if (getLexer().isNot(AsmToken::LParen)) {
 2008         if (!Parser.parseOptionalToken(AsmToken::Colon))
 2051   if (!(getLexer().is(AsmToken::Identifier) &&
 2056   if (!getLexer().is(AsmToken::RCurly))
 2068   if (getLexer().is(AsmToken::LCurly)) {
 2072     if(getLexer().is(AsmToken::Integer)) {
 2077       if (!getLexer().is(AsmToken::Identifier) ||
 2091       if (!getLexer().is(AsmToken::RCurly))
 2109       if (!Z || getLexer().is(AsmToken::LCurly)) {
 2119           if (!getLexer().is(AsmToken::RCurly))
 2129         if (getLexer().is(AsmToken::LCurly) && !Z) {
 2173     if (this->getLexer().isNot(AsmToken::LParen))
 2175     AsmToken Buf[2];
 2181     case AsmToken::Percent:
 2182     case AsmToken::Comma:
 2185     case AsmToken::At:
 2186     case AsmToken::Dollar:
 2188           (Buf[1].is(AsmToken::Identifier) || Buf[1].is(AsmToken::String)) &&
 2188           (Buf[1].is(AsmToken::Identifier) || Buf[1].is(AsmToken::String)) &&
 2193     case AsmToken::Identifier:
 2194     case AsmToken::String:
 2226   if (!parseOptionalToken(AsmToken::LParen)) {
 2241   if (getLexer().isNot(AsmToken::Comma) && getLexer().isNot(AsmToken::RParen)) {
 2241   if (getLexer().isNot(AsmToken::Comma) && getLexer().isNot(AsmToken::RParen)) {
 2254   if (parseOptionalToken(AsmToken::Comma)) {
 2261     if (getLexer().isNot(AsmToken::RParen)) {
 2283         if (parseOptionalToken(AsmToken::Comma)) {
 2288           if (getLexer().isNot(AsmToken::RParen)) {
 2308   if (parseToken(AsmToken::RParen, "unexpected token in memory operand"))
 2332   if (getTok().is(AsmToken::Percent) ||
 2333       (isParsingIntelSyntax() && getTok().is(AsmToken::Identifier) &&
 2356       if (getLexer().isNot(AsmToken::Identifier))
 2360       if (getLexer().isNot(AsmToken::RCurly))
 2374       if (getLexer().is(AsmToken::LCurly)) {
 2378         if (getLexer().isNot(AsmToken::Identifier))
 2581     if (getLexer().is(AsmToken::EndOfStatement)) {
 2631   if (getLexer().isNot(AsmToken::EndOfStatement) && !isPrefix) {
 2633     if (getLexer().is(AsmToken::Star))
 2646       if (getLexer().is(AsmToken::Comma))
 2656         (getLexer().is(AsmToken::LCurly) || getLexer().is(AsmToken::RCurly));
 2656         (getLexer().is(AsmToken::LCurly) || getLexer().is(AsmToken::RCurly));
 2657     if (getLexer().isNot(AsmToken::EndOfStatement) && !CurlyAsEndOfStatement)
 2669   if (getLexer().is(AsmToken::EndOfStatement) ||
 2670       (isPrefix && getLexer().is(AsmToken::Slash)))
 3558 bool X86AsmParser::ParseDirective(AsmToken DirectiveID) {
 3564     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 3576     if (getLexer().isNot(AsmToken::EndOfStatement)) {
 3618   if (parseToken(AsmToken::EndOfStatement, "unexpected token in directive"))
 3753   if (getLexer().getTok().isNot(AsmToken::Integer)) {
 3792   if (getLexer().isNot(AsmToken::EndOfStatement))
 3805   if (getLexer().isNot(AsmToken::Comma))
 3812   if (getLexer().isNot(AsmToken::EndOfStatement))
 3825   if (getLexer().isNot(AsmToken::Comma))
 3832   if (getLexer().isNot(AsmToken::EndOfStatement))
 3845   if (getLexer().isNot(AsmToken::Comma))
 3852   if (getLexer().isNot(AsmToken::EndOfStatement))
 3863   if (getLexer().is(AsmToken::At)) {
 3873   if (getLexer().isNot(AsmToken::EndOfStatement))
tools/llvm-mc/llvm-mc.cpp
  249   while (Lexer.Lex().isNot(AsmToken::Eof)) {
  252     if (Lexer.getTok().getKind() == AsmToken::Error)
usr/include/c++/7.4.0/bits/alloc_traits.h
  387       using allocator_type = allocator<_Tp>;
  389       using value_type = _Tp;
  392       using pointer = _Tp*;
  395       using const_pointer = const _Tp*;
  474 	construct(allocator_type& __a, _Up* __p, _Args&&... __args)
  474 	construct(allocator_type& __a, _Up* __p, _Args&&... __args)
  486 	destroy(allocator_type& __a, _Up* __p)
usr/include/c++/7.4.0/bits/allocator.h
  108     class allocator: public __allocator_base<_Tp>
  113       typedef _Tp*       pointer;
  114       typedef const _Tp* const_pointer;
  115       typedef _Tp&       reference;
  116       typedef const _Tp& const_reference;
  117       typedef _Tp        value_type;
  137 	allocator(const allocator<_Tp1>&) throw() { }
  158     operator!=(const allocator<_T1>&, const allocator<_T2>&)
  158     operator!=(const allocator<_T1>&, const allocator<_T2>&)
  164     operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
  164     operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
usr/include/c++/7.4.0/bits/move.h
   46     inline _GLIBCXX_CONSTEXPR _Tp*
   47     __addressof(_Tp& __r) _GLIBCXX_NOEXCEPT
   72     constexpr _Tp&&
   73     forward(typename std::remove_reference<_Tp>::type& __t) noexcept
   83     constexpr _Tp&&
   84     forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
   98     move(_Tp&& __t) noexcept
  104     : public __and_<__not_<is_nothrow_move_constructible<_Tp>>,
  105                     is_copy_constructible<_Tp>>::type { };
usr/include/c++/7.4.0/bits/stl_construct.h
   74     _Construct(_T1* __p, _Args&&... __args)
   74     _Construct(_T1* __p, _Args&&... __args)
   75     { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
   75     { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
   97     _Destroy(_Tp* __pointer)
  204 	     allocator<_Tp>&)
usr/include/c++/7.4.0/bits/stl_iterator.h
 1224     __make_move_if_noexcept_iterator(_Tp* __i)
usr/include/c++/7.4.0/bits/stl_iterator_base_types.h
  181       typedef _Tp                         value_type;
  183       typedef _Tp*                        pointer;
  184       typedef _Tp&                        reference;
  192       typedef _Tp                         value_type;
  194       typedef const _Tp*                  pointer;
  195       typedef const _Tp&                  reference;
usr/include/c++/7.4.0/bits/stl_uninitialized.h
  288 			   _ForwardIterator __result, allocator<_Tp>&)
usr/include/c++/7.4.0/bits/stl_vector.h
   77 	rebind<_Tp>::other _Tp_alloc_type;
  216     class vector : protected _Vector_base<_Tp, _Alloc>
  227       typedef _Vector_base<_Tp, _Alloc>			_Base;
  232       typedef _Tp					value_type;
  919       _Tp*
  923       const _Tp*
 1483 	_M_realloc_insert(iterator __position, _Args&&... __args);
usr/include/c++/7.4.0/ext/alloc_traits.h
  117       { typedef typename _Base_type::template rebind_alloc<_Tp> other; };
usr/include/c++/7.4.0/ext/new_allocator.h
   63       typedef _Tp*       pointer;
   64       typedef const _Tp* const_pointer;
   65       typedef _Tp&       reference;
   66       typedef const _Tp& const_reference;
   67       typedef _Tp        value_type;
   84 	new_allocator(const new_allocator<_Tp1>&) _GLIBCXX_USE_NOEXCEPT { }
  111 	return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
  130       { return size_t(-1) / sizeof(_Tp); }
  135 	construct(_Up* __p, _Args&&... __args)
  135 	construct(_Up* __p, _Args&&... __args)
  136 	{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
  140 	destroy(_Up* __p) { __p->~_Up(); }
  160     operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
  160     operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
usr/include/c++/7.4.0/initializer_list
   50       typedef _E 		value_type;
   51       typedef const _E& 	reference;
   52       typedef const _E& 	const_reference;
   54       typedef const _E* 	iterator;
   55       typedef const _E* 	const_iterator;
usr/include/c++/7.4.0/type_traits
  215     : public __is_void_helper<typename remove_cv<_Tp>::type>::type
  326     : public __is_integral_helper<typename remove_cv<_Tp>::type>::type
  354     : public __is_floating_point_helper<typename remove_cv<_Tp>::type>::type
  381     : public __is_pointer_helper<typename remove_cv<_Tp>::type>::type
  567     : public __is_null_pointer_helper<typename remove_cv<_Tp>::type>::type
  581     : public __or_<is_lvalue_reference<_Tp>,
  582                    is_rvalue_reference<_Tp>>::type
  588     : public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type
  588     : public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type
  601     : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
  601     : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
  602                           is_void<_Tp>>>::type
  611     : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
  611     : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
  611     : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
  612                    is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type
  612                    is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type
  631     : public __is_member_pointer_helper<typename remove_cv<_Tp>::type>::type
  638     : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
  638     : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
  777     : public __and_<is_array<_Tp>, __not_<extent<_Tp>>>
  777     : public __and_<is_array<_Tp>, __not_<extent<_Tp>>>
  798       typedef decltype(__test<_Tp>(0)) type;
  811                remove_all_extents<_Tp>::type>::type
  825     : public __is_destructible_safe<_Tp>::type
  984       typedef decltype(__test<_Tp, _Arg>(0)) type;
  989     : public __and_<is_destructible<_Tp>,
  990                     __is_direct_constructible_impl<_Tp, _Arg>>
 1072 			 __is_direct_constructible_ref_cast<_Tp, _Arg>,
 1073 			 __is_direct_constructible_new_safe<_Tp, _Arg>
 1079     : public __is_direct_constructible_new<_Tp, _Arg>::type
 1119     : public __is_direct_constructible<_Tp, _Arg>
 1130     : public __is_constructible_impl<_Tp, _Args...>::type
 1142     : public is_constructible<_Tp, const _Tp&>
 1142     : public is_constructible<_Tp, const _Tp&>
 1148     : public __is_copy_constructible_impl<_Tp>
 1160     : public is_constructible<_Tp, _Tp&&>
 1160     : public is_constructible<_Tp, _Tp&&>
 1166     : public __is_move_constructible_impl<_Tp>
 1215     : public __and_<is_constructible<_Tp, _Args...>,
 1216 		    __is_nt_constructible_impl<_Tp, _Args...>>
 1246     : public is_nothrow_constructible<_Tp, _Tp&&>
 1246     : public is_nothrow_constructible<_Tp, _Tp&&>
 1252     : public __is_nothrow_move_constructible_impl<_Tp>
 1554     { typedef _Tp     type; };
 1563     { typedef _Tp     type; };
 1574       remove_const<typename remove_volatile<_Tp>::type>::type     type;
 1629     { typedef _Tp   type; };
 1633     { typedef _Tp   type; };
 1659     { typedef _Tp&&   type; };
 1955     { typedef _Tp     type; };