Home | History | Annotate | Download | only in AsmParser

Lines Matching full:lex

46   Lex.Lex();
55 Lex.Lex();
60 if (Lex.getKind() != lltok::Eof)
61 return Error(Lex.getLoc(), "expected end of string");
213 switch (Lex.getKind()) {
280 assert(Lex.getKind() == lltok::kw_module);
281 Lex.Lex();
295 assert(Lex.getKind() == lltok::kw_target);
297 switch (Lex.Lex()) {
300 Lex.Lex();
307 Lex.Lex();
321 assert(Lex.getKind() == lltok::kw_deplibs);
322 Lex.Lex();
341 LocTy TypeLoc = Lex.getLoc();
342 unsigned TypeID = Lex.getUIntVal();
343 Lex.Lex(); // eat LocalVarID;
368 std::string Name = Lex.getStrVal();
369 LocTy NameLoc = Lex.getLoc();
370 Lex.Lex(); // eat LocalVar.
395 assert(Lex.getKind() == lltok::kw_declare);
396 Lex.Lex();
405 assert(Lex.getKind() == lltok::kw_define);
406 Lex.Lex();
418 if (Lex.getKind() == lltok::kw_constant)
420 else if (Lex.getKind() == lltok::kw_global)
426 Lex.Lex();
440 LocTy NameLoc = Lex.getLoc();
443 if (Lex.getKind() == lltok::GlobalID) {
444 if (Lex.getUIntVal() != VarID)
445 return Error(Lex.getLoc(), "variable expected to be numbered '%" +
447 Lex.Lex(); // eat GlobalID;
464 if (Lex.getKind() != lltok::kw_alias)
476 assert(Lex.getKind() == lltok::GlobalVar);
477 LocTy NameLoc = Lex.getLoc();
478 std::string Name = Lex.getStrVal();
479 Lex.Lex();
493 if (Lex.getKind() != lltok::kw_alias)
502 assert(Lex.getKind() == lltok::ComdatVar);
503 std::string Name = Lex.getStrVal();
504 LocTy NameLoc = Lex.getLoc();
505 Lex.Lex();
514 switch (Lex.getKind()) {
533 Lex.Lex();
577 FwdRef = std::make_pair(MDTuple::getTemporary(Context, None), Lex.getLoc());
587 assert(Lex.getKind() == lltok::MetadataVar);
588 std::string Name = Lex.getStrVal();
589 Lex.Lex();
597 if (Lex.getKind() != lltok::rbrace)
613 assert(Lex.getKind() == lltok::exclaim);
614 Lex.Lex();
623 if (Lex.getKind() == lltok::Type)
627 if (Lex.getKind() == lltok::MetadataVar) {
669 assert(Lex.getKind() == lltok::kw_alias);
670 Lex.Lex();
682 LocTy ExplicitTypeLoc = Lex.getLoc();
688 LocTy AliaseeLoc = Lex.getLoc();
689 if (Lex.getKind() != lltok::kw_bitcast &&
690 Lex.getKind() != lltok::kw_getelementptr &&
691 Lex.getKind() != lltok::kw_addrspacecast &&
692 Lex.getKind() != lltok::kw_inttoptr) {
863 while (Lex.getKind() == lltok::comma) {
864 Lex.Lex();
866 if (Lex.getKind() == lltok::kw_section) {
867 Lex.Lex();
868 GV->setSection(Lex.getStrVal());
871 } else if (Lex.getKind() == lltok::kw_align) {
892 assert(Lex.getKind() == lltok::kw_attributes);
893 LocTy AttrGrpLoc = Lex.getLoc();
894 Lex.Lex();
896 if (Lex.getKind() != lltok::AttrGrpID)
899 unsigned VarID = Lex.getUIntVal();
902 Lex.Lex();
927 lltok::Kind Token = Lex.getKind();
929 BuiltinLoc = Lex.getLoc();
933 return Error(Lex.getLoc(), "unterminated attribute group");
944 Error(Lex.getLoc(),
947 unsigned AttrGrpNum = Lex.getUIntVal();
968 Lex.Lex();
982 Lex.Lex();
1040 Error(Lex.getLoc(),
1054 Error(Lex.getLoc(),
1059 Lex.Lex();
1172 if (Lex.getKind() != T)
1174 Lex.Lex();
1181 if (Lex.getKind() != lltok::StringConstant)
1183 Result = Lex.getStrVal();
1184 Lex.Lex();
1191 if (Lex.getKind() != lltok::APSInt || Lex.getAPSIntVal().isSigned())
1193 uint64_t Val64 = Lex.getAPSIntVal().getLimitedValue(0xFFFFFFFFULL+1);
1197 Lex.Lex();
1204 if (Lex.getKind() != lltok::APSInt || Lex.getAPSIntVal().isSigned())
1206 Val = Lex.getAPSIntVal().getLimitedValue();
1207 Lex.Lex();
1216 switch (Lex.getKind()) {
1230 Lex.Lex();
1244 if (Lex.getKind() == lltok::lparen) {
1245 Lex.Lex();
1268 std::string Attr = Lex.getStrVal();
1269 Lex.Lex();
1284 lltok::Kind Token = Lex.getKind();
1355 HaveError |= Error(Lex.getLoc(), "invalid use of function-only attribute");
1359 Lex.Lex();
1370 lltok::Kind Token = Lex.getKind();
1413 HaveError |= Error(Lex.getLoc(), "invalid use of parameter-only attribute");
1444 HaveError |= Error(Lex.getLoc(), "invalid use of function-only attribute");
1449 HaveError |= Error(Lex.getLoc(), "invalid use of attribute on return type");
1452 Lex.Lex();
1471 switch (Lex.getKind()) {
1487 Lex.Lex();
1499 switch (Lex.getKind()) {
1505 Lex.Lex();
1515 switch (Lex.getKind()) {
1520 Lex.Lex();
1556 switch (Lex.getKind()) {
1586 Lex.Lex();
1591 Lex.Lex();
1598 assert(Lex.getKind() == lltok::MetadataVar && "Expected metadata attachment");
1600 std::string Name = Lex.getStrVal();
1602 Lex.Lex();
1611 if (Lex.getKind() != lltok::MetadataVar)
1631 while (Lex.getKind() == lltok::MetadataVar) {
1649 LocTy AlignLoc = Lex.getLoc();
1672 LocTy ParenLoc = Lex.getLoc();
1675 LocTy DerefLoc = Lex.getLoc();
1677 ParenLoc = Lex.getLoc();
1696 if (Lex.getKind() == lltok::MetadataVar) {
1701 if (Lex.getKind() != lltok::kw_align)
1702 return Error(Lex.getLoc(), "expected metadata or 'align'");
1732 switch (Lex.getKind()) {
1741 Lex.Lex();
1752 LocTy ParenLoc = Lex.getLoc();
1755 LocTy AlignLoc = Lex.getLoc();
1757 ParenLoc = Lex.getLoc();
1778 if (Lex.getKind() != lltok::comma)
1782 if (Lex.getKind() == lltok::MetadataVar) {
1801 SMLoc TypeLoc = Lex.getLoc();
1802 switch (Lex.getKind()) {
1807 Result = Lex.getTyVal();
1808 Lex.Lex();
1817 Lex.Lex(); // eat the lsquare.
1823 Lex.Lex();
1824 if (Lex.getKind() == lltok::lbrace) {
1833 std::pair<Type*, LocTy> &Entry = NamedTypes[Lex.getStrVal()];
1838 Entry.first = StructType::create(Context, Lex.getStrVal());
1839 Entry.second = Lex.getLoc();
1842 Lex.Lex();
1848 std::pair<Type*, LocTy> &Entry = NumberedTypes[Lex.getUIntVal()];
1854 Entry.second = Lex.getLoc();
1857 Lex.Lex();
1864 switch (Lex.getKind()) {
1880 Lex.Lex();
1921 while (Lex.getKind() != lltok::rparen) {
1928 if (Lex.getKind() == lltok::dotdotdot) {
1934 Lex.Lex(); // Lex the '...', it is purely for readability.
1963 Lex.Lex(); // Lex the ')'.
1978 LocTy BeginLoc = Lex.getLoc();
1982 while (Lex.getKind() != lltok::rsquare) {
1996 while (Lex.getKind() != lltok::rparen) {
2011 Lex.Lex(); // Lex the ')'.
2017 Lex.Lex(); // Lex the ']'.
2033 assert(Lex.getKind() == lltok::lparen);
2034 Lex.Lex(); // eat the (.
2036 if (Lex.getKind() == lltok::rparen) {
2038 } else if (Lex.getKind() == lltok::dotdotdot) {
2040 Lex.Lex();
2042 LocTy TypeLoc = Lex.getLoc();
2053 if (Lex.getKind() == lltok::LocalVar) {
2054 Name = Lex.getStrVal();
2055 Lex.Lex();
2074 TypeLoc = Lex.getLoc();
2080 if (Lex.getKind() == lltok::LocalVar) {
2081 Name = Lex.getStrVal();
2082 Lex.Lex();
2103 assert(Lex.getKind() == lltok::lparen);
2167 if (Lex.getKind() != lltok::lbrace) {
2204 assert(Lex.getKind() == lltok::lbrace);
2205 Lex.Lex(); // Consume the '{'
2211 LocTy EltTyLoc = Lex.getLoc();
2220 EltTyLoc = Lex.getLoc();
2238 if (Lex.getKind() != lltok::APSInt || Lex.getAPSIntVal().isSigned() ||
2239 Lex.getAPSIntVal().getBitWidth() > 64)
2242 LocTy SizeLoc = Lex.getLoc();
2243 uint64_t Size = Lex.getAPSIntVal().getZExtValue();
2244 Lex.Lex();
2249 LocTy TypeLoc = Lex.getLoc();
2518 ID.Loc = Lex.getLoc();
2519 switch (Lex.getKind()) {
2522 ID.UIntVal = Lex.getUIntVal();
2526 ID.StrVal = Lex.getStrVal();
2530 ID.UIntVal = Lex.getUIntVal();
2534 ID.StrVal = Lex.getStrVal();
2538 ID.APSIntVal = Lex.getAPSIntVal();
2542 ID.APFloatVal = Lex.getAPFloatVal();
2560 Lex.Lex();
2576 Lex.Lex();
2580 LocTy FirstEltLoc = Lex.getLoc();
2617 Lex.Lex();
2619 LocTy FirstEltLoc = Lex.getLoc();
2651 Lex.Lex();
2652 ID.ConstantVal = ConstantDataArray::getString(Context, Lex.getStrVal(),
2662 Lex.Lex();
2670 ID.StrVal2 = Lex.getStrVal();
2679 Lex.Lex();
2767 unsigned Opc = Lex.getUIntVal();
2770 Lex.Lex();
2787 Lex.Lex();
2805 Lex.Lex();
2832 unsigned PredVal, Opc = Lex.getUIntVal();
2834 Lex.Lex();
2882 unsigned Opc = Lex.getUIntVal();
2884 Lex.Lex();
2885 LocTy ModifierLoc = Lex
2953 unsigned Opc = Lex.getUIntVal();
2955 Lex.Lex();
2977 unsigned Opc = Lex.getUIntVal();
2981 Lex.Lex();
2989 LocTy ExplicitTypeLoc = Lex.getLoc();
3072 Lex.Lex();
3097 LocTy KwLoc = Lex.getLoc();
3102 if (Lex.getKind() != lltok::ComdatVar)
3104 C = getComdat(Lex.getStrVal(), Lex.getLoc());
3105 Lex.Lex();
3122 if (Lex.getKind() == lltok::rbrace ||
3123 Lex.getKind() == lltok::rsquare ||
3124 Lex.getKind() == lltok::greater ||
3125 Lex.getKind() == lltok::rparen)
3154 if (Lex.getKind() == lltok::MetadataVar)
3163 if (Lex.getKind() == lltok::lbrace)
3260 if (Lex.getKind() != lltok::APSInt || Lex.getAPSIntVal().isSigned())
3263 auto &U = Lex.getAPSIntVal();
3269 Lex.Lex();
3284 if (Lex.getKind() == lltok::APSInt)
3287 if (Lex.getKind() != lltok::DwarfTag)
3290 unsigned Tag = dwarf::getTag(Lex.getStrVal());
3292 return TokError("invalid DWARF tag" + Twine(" '") + Lex.getStrVal() + "'");
3296 Lex.Lex();
3303 if (Lex.getKind() == lltok::APSInt)
3306 if (Lex.getKind() != lltok::DwarfMacinfo)
3309 unsigned Macinfo = dwarf::getMacinfo(Lex.getStrVal());
3312 "invalid DWARF macinfo type" + Twine(" '") + Lex.getStrVal() + "'");
3316 Lex.Lex();
3323 if (Lex.getKind() == lltok::APSInt)
3326 if (Lex.getKind() != lltok::DwarfVirtuality)
3329 unsigned Virtuality = dwarf::getVirtuality(Lex.getStrVal());
3332 Lex.getStrVal() + "'");
3335 Lex.Lex();
3341 if (Lex.getKind() == lltok::APSInt)
3344 if (Lex.getKind() != lltok::DwarfLang)
3347 unsigned Lang = dwarf::getLanguage(Lex.getStrVal());
3349 return TokError("invalid DWARF language" + Twine(" '") + Lex.getStrVal() +
3353 Lex.Lex();
3360 if (Lex.getKind() == lltok::APSInt)
3363 if (Lex.getKind() != lltok::DwarfAttEncoding)
3366 unsigned Encoding = dwarf::getAttributeEncoding(Lex.getStrVal());
3369 Lex.getStrVal() + "'");
3372 Lex.Lex();
3386 if (Lex.getKind() == lltok::APSInt && !Lex.getAPSIntVal().isSigned())
3389 if (Lex.getKind() != lltok::DIFlag)
3392 Val = DINode::getFlag(Lex.getStrVal());
3395 Lex.getStrVal() + "'");
3396 Lex.Lex();
3416 if (Lex.getKind() != lltok::APSInt)
3419 auto &S = Lex.getAPSIntVal();
3429 Lex.Lex();
3435 switch (Lex.getKind()) {
3445 Lex.Lex();
3451 if (Lex.getKind() == lltok::kw_null) {
3454 Lex.Lex();
3479 LocTy ValueLoc = Lex.getLoc();
3506 if (Lex.getKind() != lltok::LabelStr)
3518 assert(Lex.getKind() == lltok::MetadataVar && "Expected metadata type name");
3519 Lex.Lex();
3523 if (Lex.getKind() != lltok::rparen)
3527 ClosingLoc = Lex.getLoc();
3536 LocTy Loc = Lex.getLoc();
3537 Lex.Lex();
3542 assert(Lex.getKind() == lltok::MetadataVar && "Expected metadata type name");
3545 if (Lex.getStrVal() == #CLASS) \
3558 if (Lex.getStrVal() == #NAME) \
3566 return TokError(Twine("invalid field '") + Lex.getStrVal() + "'"); \
3735 return Lex.Error("missing 'distinct', required for !DICompileUnit");
3773 Lex.getLoc();
3796 return Lex.Error(
3991 assert(Lex.getKind() == lltok::MetadataVar && "Expected metadata type name");
3992 Lex.Lex();
3998 if (Lex.getKind() != lltok::rparen)
4000 if (Lex.getKind() == lltok::DwarfOp) {
4001 if (unsigned Op = dwarf::getOperationEncoding(Lex.getStrVal())) {
4002 Lex.Lex();
4006 return TokError(Twine("invalid DWARF op '") + Lex.getStrVal() + "'");
4009 if (Lex.getKind() != lltok::APSInt || Lex.getAPSIntVal().isSigned())
4012 auto &U = Lex.getAPSIntVal();
4016 Lex.Lex();
4117 if (Lex.getKind() == lltok::MetadataVar) {
4127 if (Lex.getKind() != lltok::exclaim)
4131 assert(Lex.getKind() == lltok::exclaim && "Expected '!' here");
4132 Lex.Lex();
4136 if (Lex.getKind() == lltok::StringConstant) {
4276 auto Loc = Lex.getLoc();
4313 Loc = Lex.getLoc();
4328 LocTy LinkageLoc = Lex.getLoc();
4336 LocTy RetTypeLoc = Lex.getLoc();
4375 LocTy NameLoc = Lex.getLoc();
4378 if (Lex.getKind() == lltok::GlobalVar) {
4379 FunctionName = Lex.getStrVal();
4380 } else if (Lex.getKind() == lltok::GlobalID) { // @42 is ok.
4381 unsigned NameID = Lex.getUIntVal();
4390 Lex.Lex();
4392 if (Lex.getKind() != lltok::lparen)
4601 if (Lex.getKind() != lltok::lbrace)
4603 Lex.Lex(); // eat the {.
4617 if (Lex.getKind() == lltok::rbrace || Lex.getKind() == lltok::kw_uselistorder)
4620 while (Lex.getKind() != lltok::rbrace &&
4621 Lex.getKind() != lltok::kw_uselistorder)
4624 while (Lex.getKind() != lltok::rbrace)
4629 Lex.Lex();
4640 LocTy NameLoc = Lex.getLoc();
4641 if (Lex.getKind() == lltok::LabelStr) {
4642 Name = Lex.getStrVal();
4643 Lex.Lex();
4658 LocTy NameLoc = Lex.getLoc();
4662 if (Lex.getKind() == lltok::LocalVarID) {
4663 NameID = Lex.getUIntVal();
4664 Lex.Lex();
4667 } else if (Lex.getKind() == lltok::LocalVar) {
4668 NameStr = Lex.getStrVal();
4669 Lex.Lex();
4711 lltok::Kind Token = Lex.getKind();
4714 LocTy Loc = Lex.getLoc();
4715 unsigned KeywordVal = Lex.getUIntVal();
4716 Lex.Lex(); // Eat the keyword.
4832 switch (Lex.getKind()) {
4852 switch (Lex.getKind()) {
4866 Lex.Lex();
4879 SMLoc TypeLoc = Lex.getLoc();
4954 while (Lex.getKind() != lltok::rsquare) {
4971 Lex.Lex(); // Eat the ']'.
4997 if (Lex.getKind() != lltok::rsquare) {
5025 LocTy CallLoc = Lex.getLoc();
5144 while (Lex.getKind() != lltok::rsquare) {
5167 Lex.Lex(); // Lex the ']'.
5186 if (Lex.getKind() == lltok::kw_to) {
5187 Lex.Lex();
5229 if (Lex.getKind() != lltok::kw_none && Lex.getKind() != lltok::LocalVar &&
5230 Lex.getKind() != lltok::LocalVarID)
5279 if (Lex.getKind() != lltok::LocalVar && Lex.getKind() != lltok::LocalVarID)
5301 if (Lex.getKind() != lltok::kw_none && Lex.getKind() != lltok::LocalVar &&
5302 Lex.getKind() != lltok::LocalVarID)
5539 if (Lex.getKind() == lltok::MetadataVar) {
5577 while (Lex.getKind() == lltok::kw_catch || Lex.getKind() == lltok::kw_filter){
5631 LocTy CallLoc = Lex.getLoc();
5754 if (Lex.getKind() == lltok::kw_align) {
5756 } else if (Lex.getKind() == lltok::MetadataVar) {
5786 if (Lex.getKind() == lltok::kw_atomic) {
5788 Lex.Lex();
5792 if (Lex.getKind() == lltok::kw_volatile) {
5794 Lex.Lex();
5798 LocTy ExplicitTypeLoc = Lex.getLoc();
5834 if (Lex.getKind() == lltok::kw_atomic) {
5836 Lex.Lex();
5840 if (Lex.getKind() == lltok::kw_volatile) {
5842 Lex.Lex();
5935 switch (Lex.getKind()) {
5949 Lex.Lex(); // Eat the operation.
6004 LocTy ExplicitTypeLoc = Lex.getLoc();
6027 if (Lex.getKind() == lltok::MetadataVar) {
6164 SMLoc Loc = Lex.getLoc();
6167 if (Lex.getKind() == lltok::rbrace)
6168 return Lex.Error("expected non-empty list of uselistorder indexes");
6206 SMLoc Loc = Lex.getLoc();
6223 assert(Lex.getKind() == lltok::kw_uselistorder_bb);
6224 SMLoc Loc = Lex.getLoc();
6225 Lex.Lex();