Lines Matching refs:Lex
50 Lex.Lex(); in Run()
54 Lex.getLoc(), in Run()
64 Lex.Lex(); in parseStandaloneConstantValue()
69 if (Lex.getKind() != lltok::Eof) in parseStandaloneConstantValue()
70 return Error(Lex.getLoc(), "expected end of string"); in parseStandaloneConstantValue()
77 Lex.Lex(); in parseTypeAtBeginning()
80 SMLoc Start = Lex.getLoc(); in parseTypeAtBeginning()
84 SMLoc End = Lex.getLoc(); in parseTypeAtBeginning()
251 switch (Lex.getKind()) { in ParseTopLevelEntities()
282 assert(Lex.getKind() == lltok::kw_module); in ParseModuleAsm()
283 Lex.Lex(); in ParseModuleAsm()
297 assert(Lex.getKind() == lltok::kw_target); in ParseTargetDefinition()
299 switch (Lex.Lex()) { in ParseTargetDefinition()
302 Lex.Lex(); in ParseTargetDefinition()
309 Lex.Lex(); in ParseTargetDefinition()
321 assert(Lex.getKind() == lltok::kw_source_filename); in ParseSourceFileName()
323 Lex.Lex(); in ParseSourceFileName()
336 assert(Lex.getKind() == lltok::kw_deplibs); in ParseDepLibs()
337 Lex.Lex(); in ParseDepLibs()
356 LocTy TypeLoc = Lex.getLoc(); in ParseUnnamedType()
357 unsigned TypeID = Lex.getUIntVal(); in ParseUnnamedType()
358 Lex.Lex(); // eat LocalVarID; in ParseUnnamedType()
383 std::string Name = Lex.getStrVal(); in ParseNamedType()
384 LocTy NameLoc = Lex.getLoc(); in ParseNamedType()
385 Lex.Lex(); // eat LocalVar. in ParseNamedType()
410 assert(Lex.getKind() == lltok::kw_declare); in ParseDeclare()
411 Lex.Lex(); in ParseDeclare()
414 while (Lex.getKind() == lltok::MetadataVar) { in ParseDeclare()
433 assert(Lex.getKind() == lltok::kw_define); in ParseDefine()
434 Lex.Lex(); in ParseDefine()
446 if (Lex.getKind() == lltok::kw_constant) in ParseGlobalType()
448 else if (Lex.getKind() == lltok::kw_global) in ParseGlobalType()
454 Lex.Lex(); in ParseGlobalType()
479 LocTy NameLoc = Lex.getLoc(); in ParseUnnamedGlobal()
482 if (Lex.getKind() == lltok::GlobalID) { in ParseUnnamedGlobal()
483 if (Lex.getUIntVal() != VarID) in ParseUnnamedGlobal()
484 return Error(Lex.getLoc(), "variable expected to be numbered '%" + in ParseUnnamedGlobal()
486 Lex.Lex(); // eat GlobalID; in ParseUnnamedGlobal()
500 if (Lex.getKind() != lltok::kw_alias && Lex.getKind() != lltok::kw_ifunc) in ParseUnnamedGlobal()
513 assert(Lex.getKind() == lltok::GlobalVar); in ParseNamedGlobal()
514 LocTy NameLoc = Lex.getLoc(); in ParseNamedGlobal()
515 std::string Name = Lex.getStrVal(); in ParseNamedGlobal()
516 Lex.Lex(); in ParseNamedGlobal()
527 if (Lex.getKind() != lltok::kw_alias && Lex.getKind() != lltok::kw_ifunc) in ParseNamedGlobal()
536 assert(Lex.getKind() == lltok::ComdatVar); in parseComdat()
537 std::string Name = Lex.getStrVal(); in parseComdat()
538 LocTy NameLoc = Lex.getLoc(); in parseComdat()
539 Lex.Lex(); in parseComdat()
548 switch (Lex.getKind()) { in parseComdat()
567 Lex.Lex(); in parseComdat()
598 LocTy IDLoc = Lex.getLoc(); in ParseMDNodeID()
621 assert(Lex.getKind() == lltok::MetadataVar); in ParseNamedMetadata()
622 std::string Name = Lex.getStrVal(); in ParseNamedMetadata()
623 Lex.Lex(); in ParseNamedMetadata()
631 if (Lex.getKind() != lltok::rbrace) in ParseNamedMetadata()
647 assert(Lex.getKind() == lltok::exclaim); in ParseStandaloneMetadata()
648 Lex.Lex(); in ParseStandaloneMetadata()
657 if (Lex.getKind() == lltok::Type) in ParseStandaloneMetadata()
661 if (Lex.getKind() == lltok::MetadataVar) { in ParseStandaloneMetadata()
704 if (Lex.getKind() == lltok::kw_alias) in parseIndirectSymbol()
706 else if (Lex.getKind() == lltok::kw_ifunc) in parseIndirectSymbol()
710 Lex.Lex(); in parseIndirectSymbol()
722 LocTy ExplicitTypeLoc = Lex.getLoc(); in parseIndirectSymbol()
728 LocTy AliaseeLoc = Lex.getLoc(); in parseIndirectSymbol()
729 if (Lex.getKind() != lltok::kw_bitcast && in parseIndirectSymbol()
730 Lex.getKind() != lltok::kw_getelementptr && in parseIndirectSymbol()
731 Lex.getKind() != lltok::kw_addrspacecast && in parseIndirectSymbol()
732 Lex.getKind() != lltok::kw_inttoptr) { in parseIndirectSymbol()
918 while (Lex.getKind() == lltok::comma) { in ParseGlobal()
919 Lex.Lex(); in ParseGlobal()
921 if (Lex.getKind() == lltok::kw_section) { in ParseGlobal()
922 Lex.Lex(); in ParseGlobal()
923 GV->setSection(Lex.getStrVal()); in ParseGlobal()
926 } else if (Lex.getKind() == lltok::kw_align) { in ParseGlobal()
930 } else if (Lex.getKind() == lltok::MetadataVar) { in ParseGlobal()
950 assert(Lex.getKind() == lltok::kw_attributes); in ParseUnnamedAttrGrp()
951 LocTy AttrGrpLoc = Lex.getLoc(); in ParseUnnamedAttrGrp()
952 Lex.Lex(); in ParseUnnamedAttrGrp()
954 if (Lex.getKind() != lltok::AttrGrpID) in ParseUnnamedAttrGrp()
957 unsigned VarID = Lex.getUIntVal(); in ParseUnnamedAttrGrp()
960 Lex.Lex(); in ParseUnnamedAttrGrp()
985 lltok::Kind Token = Lex.getKind(); in ParseFnAttributeValuePairs()
987 BuiltinLoc = Lex.getLoc(); in ParseFnAttributeValuePairs()
991 return Error(Lex.getLoc(), "unterminated attribute group"); in ParseFnAttributeValuePairs()
1002 Error(Lex.getLoc(), in ParseFnAttributeValuePairs()
1005 unsigned AttrGrpNum = Lex.getUIntVal(); in ParseFnAttributeValuePairs()
1026 Lex.Lex(); in ParseFnAttributeValuePairs()
1040 Lex.Lex(); in ParseFnAttributeValuePairs()
1108 Error(Lex.getLoc(), in ParseFnAttributeValuePairs()
1124 Error(Lex.getLoc(), in ParseFnAttributeValuePairs()
1129 Lex.Lex(); in ParseFnAttributeValuePairs()
1242 if (Lex.getKind() != T) in ParseToken()
1244 Lex.Lex(); in ParseToken()
1251 if (Lex.getKind() != lltok::StringConstant) in ParseStringConstant()
1253 Result = Lex.getStrVal(); in ParseStringConstant()
1254 Lex.Lex(); in ParseStringConstant()
1261 if (Lex.getKind() != lltok::APSInt || Lex.getAPSIntVal().isSigned()) in ParseUInt32()
1263 uint64_t Val64 = Lex.getAPSIntVal().getLimitedValue(0xFFFFFFFFULL+1); in ParseUInt32()
1267 Lex.Lex(); in ParseUInt32()
1274 if (Lex.getKind() != lltok::APSInt || Lex.getAPSIntVal().isSigned()) in ParseUInt64()
1276 Val = Lex.getAPSIntVal().getLimitedValue(); in ParseUInt64()
1277 Lex.Lex(); in ParseUInt64()
1286 switch (Lex.getKind()) { in ParseTLSModel()
1300 Lex.Lex(); in ParseTLSModel()
1314 if (Lex.getKind() == lltok::lparen) { in ParseOptionalThreadLocal()
1315 Lex.Lex(); in ParseOptionalThreadLocal()
1338 std::string Attr = Lex.getStrVal(); in ParseStringAttribute()
1339 Lex.Lex(); in ParseStringAttribute()
1354 lltok::Kind Token = Lex.getKind(); in ParseOptionalParamAttrs()
1428 HaveError |= Error(Lex.getLoc(), "invalid use of function-only attribute"); in ParseOptionalParamAttrs()
1432 Lex.Lex(); in ParseOptionalParamAttrs()
1443 lltok::Kind Token = Lex.getKind(); in ParseOptionalReturnAttrs()
1488 HaveError |= Error(Lex.getLoc(), "invalid use of parameter-only attribute"); in ParseOptionalReturnAttrs()
1519 HaveError |= Error(Lex.getLoc(), "invalid use of function-only attribute"); in ParseOptionalReturnAttrs()
1524 HaveError |= Error(Lex.getLoc(), "invalid use of attribute on return type"); in ParseOptionalReturnAttrs()
1527 Lex.Lex(); in ParseOptionalReturnAttrs()
1578 Res = parseOptionalLinkageAux(Lex.getKind(), HasLinkage); in ParseOptionalLinkage()
1580 Lex.Lex(); in ParseOptionalLinkage()
1593 switch (Lex.getKind()) { in ParseOptionalVisibility()
1607 Lex.Lex(); in ParseOptionalVisibility()
1616 switch (Lex.getKind()) { in ParseOptionalDLLStorageClass()
1627 Lex.Lex(); in ParseOptionalDLLStorageClass()
1672 switch (Lex.getKind()) { in ParseOptionalCallingConv()
1710 Lex.Lex(); in ParseOptionalCallingConv()
1715 Lex.Lex(); in ParseOptionalCallingConv()
1722 assert(Lex.getKind() == lltok::MetadataVar && "Expected metadata attachment"); in ParseMetadataAttachment()
1724 std::string Name = Lex.getStrVal(); in ParseMetadataAttachment()
1726 Lex.Lex(); in ParseMetadataAttachment()
1735 if (Lex.getKind() != lltok::MetadataVar) in ParseInstructionMetadata()
1767 while (Lex.getKind() == lltok::MetadataVar) in ParseOptionalFunctionMetadata()
1780 LocTy AlignLoc = Lex.getLoc(); in ParseOptionalAlignment()
1803 LocTy ParenLoc = Lex.getLoc(); in ParseOptionalDerefAttrBytes()
1806 LocTy DerefLoc = Lex.getLoc(); in ParseOptionalDerefAttrBytes()
1808 ParenLoc = Lex.getLoc(); in ParseOptionalDerefAttrBytes()
1827 if (Lex.getKind() == lltok::MetadataVar) { in ParseOptionalCommaAlign()
1832 if (Lex.getKind() != lltok::kw_align) in ParseOptionalCommaAlign()
1833 return Error(Lex.getLoc(), "expected metadata or 'align'"); in ParseOptionalCommaAlign()
1843 Lex.Lex(); in parseAllocSizeArguments()
1845 auto StartParen = Lex.getLoc(); in parseAllocSizeArguments()
1853 auto HowManyAt = Lex.getLoc(); in parseAllocSizeArguments()
1864 auto EndParen = Lex.getLoc(); in parseAllocSizeArguments()
1892 switch (Lex.getKind()) { in ParseOrdering()
1905 Lex.Lex(); in ParseOrdering()
1916 LocTy ParenLoc = Lex.getLoc(); in ParseOptionalStackAlignment()
1919 LocTy AlignLoc = Lex.getLoc(); in ParseOptionalStackAlignment()
1921 ParenLoc = Lex.getLoc(); in ParseOptionalStackAlignment()
1942 if (Lex.getKind() != lltok::comma) in ParseIndexList()
1946 if (Lex.getKind() == lltok::MetadataVar) { in ParseIndexList()
1965 SMLoc TypeLoc = Lex.getLoc(); in ParseType()
1966 switch (Lex.getKind()) { in ParseType()
1971 Result = Lex.getTyVal(); in ParseType()
1972 Lex.Lex(); in ParseType()
1981 Lex.Lex(); // eat the lsquare. in ParseType()
1987 Lex.Lex(); in ParseType()
1988 if (Lex.getKind() == lltok::lbrace) { in ParseType()
1997 std::pair<Type*, LocTy> &Entry = NamedTypes[Lex.getStrVal()]; in ParseType()
2002 Entry.first = StructType::create(Context, Lex.getStrVal()); in ParseType()
2003 Entry.second = Lex.getLoc(); in ParseType()
2006 Lex.Lex(); in ParseType()
2012 std::pair<Type*, LocTy> &Entry = NumberedTypes[Lex.getUIntVal()]; in ParseType()
2018 Entry.second = Lex.getLoc(); in ParseType()
2021 Lex.Lex(); in ParseType()
2028 switch (Lex.getKind()) { in ParseType()
2044 Lex.Lex(); in ParseType()
2085 while (Lex.getKind() != lltok::rparen) { in ParseParameterList()
2092 if (Lex.getKind() == lltok::dotdotdot) { in ParseParameterList()
2098 Lex.Lex(); // Lex the '...', it is purely for readability. in ParseParameterList()
2127 Lex.Lex(); // Lex the ')'. in ParseParameterList()
2142 LocTy BeginLoc = Lex.getLoc(); in ParseOptionalOperandBundles()
2146 while (Lex.getKind() != lltok::rsquare) { in ParseOptionalOperandBundles()
2160 while (Lex.getKind() != lltok::rparen) { in ParseOptionalOperandBundles()
2175 Lex.Lex(); // Lex the ')'. in ParseOptionalOperandBundles()
2181 Lex.Lex(); // Lex the ']'. in ParseOptionalOperandBundles()
2197 assert(Lex.getKind() == lltok::lparen); in ParseArgumentList()
2198 Lex.Lex(); // eat the (. in ParseArgumentList()
2200 if (Lex.getKind() == lltok::rparen) { in ParseArgumentList()
2202 } else if (Lex.getKind() == lltok::dotdotdot) { in ParseArgumentList()
2204 Lex.Lex(); in ParseArgumentList()
2206 LocTy TypeLoc = Lex.getLoc(); in ParseArgumentList()
2217 if (Lex.getKind() == lltok::LocalVar) { in ParseArgumentList()
2218 Name = Lex.getStrVal(); in ParseArgumentList()
2219 Lex.Lex(); in ParseArgumentList()
2238 TypeLoc = Lex.getLoc(); in ParseArgumentList()
2244 if (Lex.getKind() == lltok::LocalVar) { in ParseArgumentList()
2245 Name = Lex.getStrVal(); in ParseArgumentList()
2246 Lex.Lex(); in ParseArgumentList()
2267 assert(Lex.getKind() == lltok::lparen); in ParseFunctionType()
2331 if (Lex.getKind() != lltok::lbrace) { in ParseStructDefinition()
2368 assert(Lex.getKind() == lltok::lbrace); in ParseStructBody()
2369 Lex.Lex(); // Consume the '{' in ParseStructBody()
2375 LocTy EltTyLoc = Lex.getLoc(); in ParseStructBody()
2384 EltTyLoc = Lex.getLoc(); in ParseStructBody()
2402 if (Lex.getKind() != lltok::APSInt || Lex.getAPSIntVal().isSigned() || in ParseArrayVectorType()
2403 Lex.getAPSIntVal().getBitWidth() > 64) in ParseArrayVectorType()
2406 LocTy SizeLoc = Lex.getLoc(); in ParseArrayVectorType()
2407 uint64_t Size = Lex.getAPSIntVal().getZExtValue(); in ParseArrayVectorType()
2408 Lex.Lex(); in ParseArrayVectorType()
2413 LocTy TypeLoc = Lex.getLoc(); in ParseArrayVectorType()
2682 ID.Loc = Lex.getLoc(); in ParseValID()
2683 switch (Lex.getKind()) { in ParseValID()
2686 ID.UIntVal = Lex.getUIntVal(); in ParseValID()
2690 ID.StrVal = Lex.getStrVal(); in ParseValID()
2694 ID.UIntVal = Lex.getUIntVal(); in ParseValID()
2698 ID.StrVal = Lex.getStrVal(); in ParseValID()
2702 ID.APSIntVal = Lex.getAPSIntVal(); in ParseValID()
2706 ID.APFloatVal = Lex.getAPFloatVal(); in ParseValID()
2724 Lex.Lex(); in ParseValID()
2740 Lex.Lex(); in ParseValID()
2744 LocTy FirstEltLoc = Lex.getLoc(); in ParseValID()
2781 Lex.Lex(); in ParseValID()
2783 LocTy FirstEltLoc = Lex.getLoc(); in ParseValID()
2815 Lex.Lex(); in ParseValID()
2816 ID.ConstantVal = ConstantDataArray::getString(Context, Lex.getStrVal(), in ParseValID()
2826 Lex.Lex(); in ParseValID()
2834 ID.StrVal2 = Lex.getStrVal(); in ParseValID()
2843 Lex.Lex(); in ParseValID()
2931 unsigned Opc = Lex.getUIntVal(); in ParseValID()
2934 Lex.Lex(); in ParseValID()
2951 Lex.Lex(); in ParseValID()
2969 Lex.Lex(); in ParseValID()
2996 unsigned PredVal, Opc = Lex.getUIntVal(); in ParseValID()
2998 Lex.Lex(); in ParseValID()
3046 unsigned Opc = Lex.getUIntVal(); in ParseValID()
3048 Lex.Lex(); in ParseValID()
3049 LocTy ModifierLoc = Lex.getLoc(); in ParseValID()
3117 unsigned Opc = Lex.getUIntVal(); in ParseValID()
3119 Lex.Lex(); in ParseValID()
3141 unsigned Opc = Lex.getUIntVal(); in ParseValID()
3145 Lex.Lex(); in ParseValID()
3153 LocTy ExplicitTypeLoc = Lex.getLoc(); in ParseValID()
3236 Lex.Lex(); in ParseValID()
3261 LocTy KwLoc = Lex.getLoc(); in parseOptionalComdat()
3266 if (Lex.getKind() != lltok::ComdatVar) in parseOptionalComdat()
3268 C = getComdat(Lex.getStrVal(), Lex.getLoc()); in parseOptionalComdat()
3269 Lex.Lex(); in parseOptionalComdat()
3286 if (Lex.getKind() == lltok::rbrace || in ParseGlobalValueVector()
3287 Lex.getKind() == lltok::rsquare || in ParseGlobalValueVector()
3288 Lex.getKind() == lltok::greater || in ParseGlobalValueVector()
3289 Lex.getKind() == lltok::rparen) in ParseGlobalValueVector()
3318 if (Lex.getKind() == lltok::MetadataVar) in ParseMDNode()
3327 if (Lex.getKind() == lltok::lbrace) in ParseMDNodeTail()
3430 if (Lex.getKind() != lltok::APSInt || Lex.getAPSIntVal().isSigned()) in ParseMDField()
3433 auto &U = Lex.getAPSIntVal(); in ParseMDField()
3439 Lex.Lex(); in ParseMDField()
3454 if (Lex.getKind() == lltok::APSInt) in ParseMDField()
3457 if (Lex.getKind() != lltok::DwarfTag) in ParseMDField()
3460 unsigned Tag = dwarf::getTag(Lex.getStrVal()); in ParseMDField()
3462 return TokError("invalid DWARF tag" + Twine(" '") + Lex.getStrVal() + "'"); in ParseMDField()
3466 Lex.Lex(); in ParseMDField()
3473 if (Lex.getKind() == lltok::APSInt) in ParseMDField()
3476 if (Lex.getKind() != lltok::DwarfMacinfo) in ParseMDField()
3479 unsigned Macinfo = dwarf::getMacinfo(Lex.getStrVal()); in ParseMDField()
3482 "invalid DWARF macinfo type" + Twine(" '") + Lex.getStrVal() + "'"); in ParseMDField()
3486 Lex.Lex(); in ParseMDField()
3493 if (Lex.getKind() == lltok::APSInt) in ParseMDField()
3496 if (Lex.getKind() != lltok::DwarfVirtuality) in ParseMDField()
3499 unsigned Virtuality = dwarf::getVirtuality(Lex.getStrVal()); in ParseMDField()
3502 Lex.getStrVal() + "'"); in ParseMDField()
3505 Lex.Lex(); in ParseMDField()
3511 if (Lex.getKind() == lltok::APSInt) in ParseMDField()
3514 if (Lex.getKind() != lltok::DwarfLang) in ParseMDField()
3517 unsigned Lang = dwarf::getLanguage(Lex.getStrVal()); in ParseMDField()
3519 return TokError("invalid DWARF language" + Twine(" '") + Lex.getStrVal() + in ParseMDField()
3523 Lex.Lex(); in ParseMDField()
3529 if (Lex.getKind() == lltok::APSInt) in ParseMDField()
3532 if (Lex.getKind() != lltok::DwarfCC) in ParseMDField()
3535 unsigned CC = dwarf::getCallingConvention(Lex.getStrVal()); in ParseMDField()
3537 return TokError("invalid DWARF calling convention" + Twine(" '") + Lex.getStrVal() + in ParseMDField()
3541 Lex.Lex(); in ParseMDField()
3547 if (Lex.getKind() == lltok::APSInt) in ParseMDField()
3550 if (Lex.getKind() != lltok::EmissionKind) in ParseMDField()
3553 auto Kind = DICompileUnit::getEmissionKind(Lex.getStrVal()); in ParseMDField()
3555 return TokError("invalid emission kind" + Twine(" '") + Lex.getStrVal() + in ParseMDField()
3559 Lex.Lex(); in ParseMDField()
3566 if (Lex.getKind() == lltok::APSInt) in ParseMDField()
3569 if (Lex.getKind() != lltok::DwarfAttEncoding) in ParseMDField()
3572 unsigned Encoding = dwarf::getAttributeEncoding(Lex.getStrVal()); in ParseMDField()
3575 Lex.getStrVal() + "'"); in ParseMDField()
3578 Lex.Lex(); in ParseMDField()
3592 if (Lex.getKind() == lltok::APSInt && !Lex.getAPSIntVal().isSigned()) in ParseMDField()
3595 if (Lex.getKind() != lltok::DIFlag) in ParseMDField()
3598 Val = DINode::getFlag(Lex.getStrVal()); in ParseMDField()
3601 Lex.getStrVal() + "'"); in ParseMDField()
3602 Lex.Lex(); in ParseMDField()
3622 if (Lex.getKind() != lltok::APSInt) in ParseMDField()
3625 auto &S = Lex.getAPSIntVal(); in ParseMDField()
3635 Lex.Lex(); in ParseMDField()
3641 switch (Lex.getKind()) { in ParseMDField()
3651 Lex.Lex(); in ParseMDField()
3657 if (Lex.getKind() == lltok::kw_null) { in ParseMDField()
3660 Lex.Lex(); in ParseMDField()
3685 LocTy ValueLoc = Lex.getLoc(); in ParseMDField()
3712 if (Lex.getKind() != lltok::LabelStr) in ParseMDFieldsImplBody()
3724 assert(Lex.getKind() == lltok::MetadataVar && "Expected metadata type name"); in ParseMDFieldsImpl()
3725 Lex.Lex(); in ParseMDFieldsImpl()
3729 if (Lex.getKind() != lltok::rparen) in ParseMDFieldsImpl()
3733 ClosingLoc = Lex.getLoc(); in ParseMDFieldsImpl()
3742 LocTy Loc = Lex.getLoc(); in ParseMDField()
3743 Lex.Lex(); in ParseMDField()
3748 assert(Lex.getKind() == lltok::MetadataVar && "Expected metadata type name"); in ParseSpecializedMDNode()
3751 if (Lex.getStrVal() == #CLASS) \ in ParseSpecializedMDNode()
3764 if (Lex.getStrVal() == #NAME) \
3772 return TokError(Twine("invalid field '") + Lex.getStrVal() + "'"); \
3956 return Lex.Error("missing 'distinct', required for !DICompileUnit"); in ParseDICompileUnit()
3992 auto Loc = Lex.getLoc(); in ParseDISubprogram()
4017 return Lex.Error( in ParseDISubprogram()
4213 assert(Lex.getKind() == lltok::MetadataVar && "Expected metadata type name"); in ParseDIExpression()
4214 Lex.Lex(); in ParseDIExpression()
4220 if (Lex.getKind() != lltok::rparen) in ParseDIExpression()
4222 if (Lex.getKind() == lltok::DwarfOp) { in ParseDIExpression()
4223 if (unsigned Op = dwarf::getOperationEncoding(Lex.getStrVal())) { in ParseDIExpression()
4224 Lex.Lex(); in ParseDIExpression()
4228 return TokError(Twine("invalid DWARF op '") + Lex.getStrVal() + "'"); in ParseDIExpression()
4231 if (Lex.getKind() != lltok::APSInt || Lex.getAPSIntVal().isSigned()) in ParseDIExpression()
4234 auto &U = Lex.getAPSIntVal(); in ParseDIExpression()
4238 Lex.Lex(); in ParseDIExpression()
4339 if (Lex.getKind() == lltok::MetadataVar) { in ParseMetadata()
4349 if (Lex.getKind() != lltok::exclaim) in ParseMetadata()
4353 assert(Lex.getKind() == lltok::exclaim && "Expected '!' here"); in ParseMetadata()
4354 Lex.Lex(); in ParseMetadata()
4358 if (Lex.getKind() == lltok::StringConstant) { in ParseMetadata()
4498 auto Loc = Lex.getLoc(); in parseConstantValue()
4535 Loc = Lex.getLoc(); in ParseTypeAndBasicBlock()
4550 LocTy LinkageLoc = Lex.getLoc(); in ParseFunctionHeader()
4559 LocTy RetTypeLoc = Lex.getLoc(); in ParseFunctionHeader()
4595 LocTy NameLoc = Lex.getLoc(); in ParseFunctionHeader()
4598 if (Lex.getKind() == lltok::GlobalVar) { in ParseFunctionHeader()
4599 FunctionName = Lex.getStrVal(); in ParseFunctionHeader()
4600 } else if (Lex.getKind() == lltok::GlobalID) { // @42 is ok. in ParseFunctionHeader()
4601 unsigned NameID = Lex.getUIntVal(); in ParseFunctionHeader()
4610 Lex.Lex(); in ParseFunctionHeader()
4612 if (Lex.getKind() != lltok::lparen) in ParseFunctionHeader()
4820 if (Lex.getKind() != lltok::lbrace) in ParseFunctionBody()
4822 Lex.Lex(); // eat the {. in ParseFunctionBody()
4836 if (Lex.getKind() == lltok::rbrace || Lex.getKind() == lltok::kw_uselistorder) in ParseFunctionBody()
4839 while (Lex.getKind() != lltok::rbrace && in ParseFunctionBody()
4840 Lex.getKind() != lltok::kw_uselistorder) in ParseFunctionBody()
4843 while (Lex.getKind() != lltok::rbrace) in ParseFunctionBody()
4848 Lex.Lex(); in ParseFunctionBody()
4859 LocTy NameLoc = Lex.getLoc(); in ParseBasicBlock()
4860 if (Lex.getKind() == lltok::LabelStr) { in ParseBasicBlock()
4861 Name = Lex.getStrVal(); in ParseBasicBlock()
4862 Lex.Lex(); in ParseBasicBlock()
4877 LocTy NameLoc = Lex.getLoc(); in ParseBasicBlock()
4881 if (Lex.getKind() == lltok::LocalVarID) { in ParseBasicBlock()
4882 NameID = Lex.getUIntVal(); in ParseBasicBlock()
4883 Lex.Lex(); in ParseBasicBlock()
4886 } else if (Lex.getKind() == lltok::LocalVar) { in ParseBasicBlock()
4887 NameStr = Lex.getStrVal(); in ParseBasicBlock()
4888 Lex.Lex(); in ParseBasicBlock()
4930 lltok::Kind Token = Lex.getKind(); in ParseInstruction()
4933 LocTy Loc = Lex.getLoc(); in ParseInstruction()
4934 unsigned KeywordVal = Lex.getUIntVal(); in ParseInstruction()
4935 Lex.Lex(); // Eat the keyword. in ParseInstruction()
5051 switch (Lex.getKind()) { in ParseCmpPredicate()
5071 switch (Lex.getKind()) { in ParseCmpPredicate()
5085 Lex.Lex(); in ParseCmpPredicate()
5098 SMLoc TypeLoc = Lex.getLoc(); in ParseRet()
5173 while (Lex.getKind() != lltok::rsquare) { in ParseSwitch()
5190 Lex.Lex(); // Eat the ']'. in ParseSwitch()
5216 if (Lex.getKind() != lltok::rsquare) { in ParseIndirectBr()
5244 LocTy CallLoc = Lex.getLoc(); in ParseInvoke()
5363 while (Lex.getKind() != lltok::rsquare) { in ParseExceptionArgs()
5386 Lex.Lex(); // Lex the ']'. in ParseExceptionArgs()
5405 if (Lex.getKind() == lltok::kw_to) { in ParseCleanupRet()
5406 Lex.Lex(); in ParseCleanupRet()
5448 if (Lex.getKind() != lltok::kw_none && Lex.getKind() != lltok::LocalVar && in ParseCatchSwitch()
5449 Lex.getKind() != lltok::LocalVarID) in ParseCatchSwitch()
5498 if (Lex.getKind() != lltok::LocalVar && Lex.getKind() != lltok::LocalVarID) in ParseCatchPad()
5520 if (Lex.getKind() != lltok::kw_none && Lex.getKind() != lltok::LocalVar && in ParseCleanupPad()
5521 Lex.getKind() != lltok::LocalVarID) in ParseCleanupPad()
5758 if (Lex.getKind() == lltok::MetadataVar) { in ParsePHI()
5796 while (Lex.getKind() == lltok::kw_catch || Lex.getKind() == lltok::kw_filter){ in ParseLandingPad()
5850 LocTy CallLoc = Lex.getLoc(); in ParseCall()
5975 if (Lex.getKind() == lltok::kw_align) { in ParseAlloc()
5977 } else if (Lex.getKind() == lltok::MetadataVar) { in ParseAlloc()
6008 if (Lex.getKind() == lltok::kw_atomic) { in ParseLoad()
6010 Lex.Lex(); in ParseLoad()
6014 if (Lex.getKind() == lltok::kw_volatile) { in ParseLoad()
6016 Lex.Lex(); in ParseLoad()
6020 LocTy ExplicitTypeLoc = Lex.getLoc(); in ParseLoad()
6057 if (Lex.getKind() == lltok::kw_atomic) { in ParseStore()
6059 Lex.Lex(); in ParseStore()
6063 if (Lex.getKind() == lltok::kw_volatile) { in ParseStore()
6065 Lex.Lex(); in ParseStore()
6158 switch (Lex.getKind()) { in ParseAtomicRMW()
6172 Lex.Lex(); // Eat the operation. in ParseAtomicRMW()
6227 LocTy ExplicitTypeLoc = Lex.getLoc(); in ParseGetElementPtr()
6250 if (Lex.getKind() == lltok::MetadataVar) { in ParseGetElementPtr()
6387 SMLoc Loc = Lex.getLoc(); in ParseUseListOrderIndexes()
6390 if (Lex.getKind() == lltok::rbrace) in ParseUseListOrderIndexes()
6391 return Lex.Error("expected non-empty list of uselistorder indexes"); in ParseUseListOrderIndexes()
6429 SMLoc Loc = Lex.getLoc(); in ParseUseListOrder()
6446 assert(Lex.getKind() == lltok::kw_uselistorder_bb); in ParseUseListOrderBB()
6447 SMLoc Loc = Lex.getLoc(); in ParseUseListOrderBB()
6448 Lex.Lex(); in ParseUseListOrderBB()