Home | History | Annotate | Download | only in AsmParser

Lines Matching full:lltok

171     case lltok::Eof: return false;
172 case lltok::kw_declare: if (ParseDeclare()) return true; break;
173 case lltok::kw_define: if (ParseDefine()) return true; break;
174 case lltok::kw_module: if (ParseModuleAsm()) return true; break;
175 case lltok::kw_target: if (ParseTargetDefinition()) return true; break;
176 case lltok::kw_deplibs: if (ParseDepLibs()) return true; break;
177 case lltok::LocalVarID: if (ParseUnnamedType()) return true; break;
178 case lltok::LocalVar: if (ParseNamedType()) return true; break;
179 case lltok::GlobalID: if (ParseUnnamedGlobal()) return true; break;
180 case lltok::GlobalVar: if (ParseNamedGlobal()) return true; break;
181 case lltok::exclaim: if (ParseStandaloneMetadata()) return true; break;
182 case lltok::MetadataVar: if (ParseNamedMetadata()) return true; break;
189 case lltok::kw_private: // OptionalLinkage
190 case lltok::kw_linker_private: // OptionalLinkage
191 case lltok::kw_linker_private_weak: // OptionalLinkage
192 case lltok::kw_linker_private_weak_def_auto: // OptionalLinkage
193 case lltok::kw_internal: // OptionalLinkage
194 case lltok::kw_weak: // OptionalLinkage
195 case lltok::kw_weak_odr: // OptionalLinkage
196 case lltok::kw_linkonce: // OptionalLinkage
197 case lltok::kw_linkonce_odr: // OptionalLinkage
198 case lltok::kw_appending: // OptionalLinkage
199 case lltok::kw_dllexport: // OptionalLinkage
200 case lltok::kw_common: // OptionalLinkage
201 case lltok::kw_dllimport: // OptionalLinkage
202 case lltok::kw_extern_weak: // OptionalLinkage
203 case lltok::kw_external: { // OptionalLinkage
211 case lltok::kw_default: // OptionalVisibility
212 case lltok::kw_hidden: // OptionalVisibility
213 case lltok::kw_protected: { // OptionalVisibility
221 case lltok::kw_thread_local: // OptionalThreadLocal
222 case lltok::kw_addrspace: // OptionalAddrSpace
223 case lltok::kw_constant: // GlobalType
224 case lltok::kw_global: // GlobalType
235 assert(Lex.getKind() == lltok::kw_module);
239 if (ParseToken(lltok::kw_asm, "expected 'module asm'") ||
250 assert(Lex.getKind() == lltok::kw_target);
254 case lltok::kw_triple:
256 if (ParseToken(lltok::equal, "expected '=' after target triple") ||
261 case lltok::kw_datalayout:
263 if (ParseToken(lltok::equal, "expected '=' after target datalayout") ||
275 assert(Lex.getKind() == lltok::kw_deplibs);
277 if (ParseToken(lltok::equal, "expected '=' after deplibs") ||
278 ParseToken(lltok::lsquare, "expected '=' after deplibs"))
281 if (EatIfPresent(lltok::rsquare))
288 while (EatIfPresent(lltok::comma)) {
293 return ParseToken(lltok::rsquare, "expected ']' at end of list");
303 if (ParseToken(lltok::equal, "expected '=' after name") ||
304 ParseToken(lltok::kw_type, "expected 'type' after '='"))
333 if (ParseToken(lltok::equal, "expected '=' after name") ||
334 ParseToken(lltok::kw_type, "expected 'type' after name"))
356 assert(Lex.getKind() == lltok::kw_declare);
366 assert(Lex.getKind() == lltok::kw_define);
378 if (Lex.getKind() == lltok::kw_constant)
380 else if (Lex.getKind() == lltok::kw_global)
401 if (Lex.getKind() == lltok::GlobalID) {
407 if (ParseToken(lltok::equal, "expected '=' after name"))
417 if (HasLinkage || Lex.getKind() != lltok::kw_alias)
426 assert(Lex.getKind() == lltok::GlobalVar);
433 if (ParseToken(lltok::equal, "expected '=' in global variable") ||
438 if (HasLinkage || Lex.getKind() != lltok::kw_alias)
491 assert(Lex.getKind() == lltok::MetadataVar);
495 lltok::equal, "expected '=' here") ||
496 ParseToken(lltok::exclaim, "Expected '!' here") ||
497 ParseToken(lltok::lbrace, "Expected '{' here"))
501 if (Lex.getKind() != lltok::rbrace)
503 if (ParseToken(lltok::exclaim, "Expected '!' here"))
509 } while (EatIfPresent(lltok::comma));
511 if (ParseToken(lltok::rbrace, "expected end of metadata node"))
520 assert(Lex.getKind() == lltok::exclaim);
528 ParseToken(lltok::equal, "expected '=' here") ||
530 ParseToken(lltok::exclaim, "Expected '!' here") ||
531 ParseToken(lltok::lbrace, "Expected '{' here") ||
533 ParseToken(lltok::rbrace, "expected end of metadata node"))
571 assert(Lex.getKind() == lltok::kw_alias);
590 if (Lex.getKind() != lltok::kw_bitcast &&
591 Lex.getKind() != lltok::kw_getelementptr) {
658 if (ParseOptionalToken(lltok::kw_thread_local, ThreadLocal) ||
660 ParseOptionalToken(lltok::kw_unnamed_addr, UnnamedAddr,
722 while (Lex.getKind() == lltok::comma) {
725 if (Lex.getKind() == lltok::kw_section) {
728 if (ParseToken(lltok::StringConstant, "expected global section string"))
730 } else if (Lex.getKind() == lltok::kw_align) {
836 bool LLParser::ParseToken(lltok::Kind T, const char *ErrMsg) {
846 if (Lex.getKind() != lltok::StringConstant)
856 if (Lex.getKind() != lltok::APSInt || Lex.getAPSIntVal().isSigned())
872 if (!EatIfPresent(lltok::kw_addrspace))
874 return ParseToken(lltok::lparen, "expected '(' in address space") ||
876 ParseToken(lltok::rparen, "expected ')' in address space");
902 case lltok::kw_zeroext: Attrs |= Attribute::ZExt; break;
903 case lltok::kw_signext: Attrs |= Attribute::SExt; break;
904 case lltok::kw_inreg: Attrs |= Attribute::InReg; break;
905 case lltok::kw_sret: Attrs |= Attribute::StructRet; break;
906 case lltok::kw_noalias: Attrs |= Attribute::NoAlias; break;
907 case lltok::kw_nocapture: Attrs |= Attribute::NoCapture; break;
908 case lltok::kw_byval: Attrs |= Attribute::ByVal; break;
909 case lltok::kw_nest: Attrs |= Attribute::Nest; break;
911 case lltok::kw_noreturn: Attrs |= Attribute::NoReturn; break;
912 case lltok::kw_nounwind: Attrs |= Attribute::NoUnwind; break;
913 case lltok::kw_uwtable: Attrs |= Attribute::UWTable; break;
914 case lltok::kw_returns_twice: Attrs |= Attribute::ReturnsTwice; break;
915 case lltok::kw_noinline: Attrs |= Attribute::NoInline; break;
916 case lltok::kw_readnone: Attrs |= Attribute::ReadNone; break;
917 case lltok::kw_readonly: Attrs |= Attribute::ReadOnly; break;
918 case lltok::kw_inlinehint: Attrs |= Attribute::InlineHint; break;
919 case lltok::kw_alwaysinline: Attrs |= Attribute::AlwaysInline; break;
920 case lltok::kw_optsize: Attrs |= Attribute::OptimizeForSize; break;
921 case lltok::kw_ssp: Attrs |= Attribute::StackProtect; break;
922 case lltok::kw_sspreq: Attrs |= Attribute::StackProtectReq; break;
923 case lltok::kw_noredzone: Attrs |= Attribute::NoRedZone; break;
924 case lltok::kw_noimplicitfloat: Attrs |= Attribute::NoImplicitFloat; break;
925 case lltok::kw_naked: Attrs |= Attribute::Naked; break;
926 case lltok::kw_nonlazybind: Attrs |= Attribute::NonLazyBind; break;
928 case lltok::kw_alignstack: {
936 case lltok::kw_align: {
971 case lltok::kw_private: Res = GlobalValue::PrivateLinkage; break;
972 case lltok::kw_linker_private: Res = GlobalValue::LinkerPrivateLinkage; break;
973 case lltok::kw_linker_private_weak:
976 case lltok::kw_linker_private_weak_def_auto:
979 case lltok::kw_internal: Res = GlobalValue::InternalLinkage; break;
980 case lltok::kw_weak: Res = GlobalValue::WeakAnyLinkage; break;
981 case lltok::kw_weak_odr: Res = GlobalValue::WeakODRLinkage; break;
982 case lltok::kw_linkonce: Res = GlobalValue::LinkOnceAnyLinkage; break;
983 case lltok::kw_linkonce_odr: Res = GlobalValue::LinkOnceODRLinkage; break;
984 case lltok::kw_available_externally:
987 case lltok::kw_appending: Res = GlobalValue::AppendingLinkage; break;
988 case lltok::kw_dllexport: Res = GlobalValue::DLLExportLinkage; break;
989 case lltok::kw_common: Res = GlobalValue::CommonLinkage; break;
990 case lltok::kw_dllimport: Res = GlobalValue::DLLImportLinkage; break;
991 case lltok::kw_extern_weak: Res = GlobalValue::ExternalWeakLinkage; break;
992 case lltok::kw_external: Res = GlobalValue::ExternalLinkage; break;
1008 case lltok::kw_default: Res = GlobalValue::DefaultVisibility; break;
1009 case lltok::kw_hidden: Res = GlobalValue::HiddenVisibility; break;
1010 case lltok::kw_protected: Res = GlobalValue::ProtectedVisibility; break;
1035 case lltok::kw_ccc: CC = CallingConv::C; break;
1036 case lltok::kw_fastcc: CC = CallingConv::Fast; break;
1037 case lltok::kw_coldcc: CC = CallingConv::Cold; break;
1038 case lltok::kw_x86_stdcallcc: CC = CallingConv::X86_StdCall; break;
1039 case lltok::kw_x86_fastcallcc: CC = CallingConv::X86_FastCall; break;
1040 case lltok::kw_x86_thiscallcc: CC = CallingConv::X86_ThisCall; break;
1041 case lltok::kw_arm_apcscc: CC = CallingConv::ARM_APCS; break;
1042 case lltok::kw_arm_aapcscc: CC = CallingConv::ARM_AAPCS; break;
1043 case lltok::kw_arm_aapcs_vfpcc:CC = CallingConv::ARM_AAPCS_VFP; break;
1044 case lltok::kw_msp430_intrcc: CC = CallingConv::MSP430_INTR; break;
1045 case lltok::kw_ptx_kernel: CC = CallingConv::PTX_Kernel; break;
1046 case lltok::kw_ptx_device: CC = CallingConv::PTX_Device; break;
1047 case lltok::kw_cc: {
1068 if (Lex.getKind() != lltok::MetadataVar)
1078 if (ParseToken(lltok::exclaim, "expected '!' here"))
1085 if (Lex.getKind() == lltok::lbrace) {
1106 } while (EatIfPresent(lltok::comma));
1115 if (!EatIfPresent(lltok::kw_align))
1135 while (EatIfPresent(lltok::comma)) {
1137 if (Lex.getKind() == lltok::MetadataVar) {
1142 if (Lex.getKind() != lltok::kw_align)
1162 if (EatIfPresent(lltok::kw_singlethread))
1166 case lltok::kw_unordered: Ordering = Unordered; break;
1167 case lltok::kw_monotonic: Ordering = Monotonic; break;
1168 case lltok::kw_acquire: Ordering = Acquire; break;
1169 case lltok::kw_release: Ordering = Release; break;
1170 case lltok::kw_acq_rel: Ordering = AcquireRelease; break;
1171 case lltok::kw_seq_cst: Ordering = SequentiallyConsistent; break;
1182 if (!EatIfPresent(lltok::kw_alignstack))
1185 if (!EatIfPresent(lltok::lparen))
1190 if (!EatIfPresent(lltok::rparen))
1210 if (Lex.getKind() != lltok::comma)
1213 while (EatIfPresent(lltok::comma)) {
1214 if (Lex.getKind() == lltok::MetadataVar) {
1236 case lltok::Type:
1241 case lltok::lbrace:
1246 case lltok::lsquare:
1252 case lltok::less: // Either vector or packed struct.
1255 if (Lex.getKind() == lltok::lbrace) {
1257 ParseToken(lltok::greater, "expected '>' at end of packed struct"))
1262 case lltok::LocalVar: {
1277 case lltok::LocalVarID: {
1305 case lltok::star:
1317 case lltok::kw_addrspace: {
1326 ParseToken(lltok::star, "expected '*' in address space"))
1334 case lltok::lparen:
1349 if (ParseToken(lltok::lparen, "expected '(' in call"))
1352 while (Lex.getKind() != lltok::rparen) {
1355 ParseToken(lltok::comma, "expected ',' in argument list"))
1391 assert(Lex.getKind() == lltok::lparen);
1394 if (Lex.getKind() == lltok::rparen) {
1396 } else if (Lex.getKind() == lltok::dotdotdot) {
1411 if (Lex.getKind() == lltok::LocalVar) {
1421 while (EatIfPresent(lltok::comma)) {
1423 if (EatIfPresent(lltok::dotdotdot)) {
1435 if (Lex.getKind() == lltok::LocalVar) {
1449 return ParseToken(lltok::rparen, "expected ')' at end of argument list");
1455 assert(Lex.getKind() == lltok::lparen);
1502 if (EatIfPresent(lltok::kw_opaque)) {
1514 bool isPacked = EatIfPresent(lltok::less);
1519 if (Lex.getKind() != lltok::lbrace) {
1540 (isPacked && ParseToken(lltok::greater, "expected '>' in packed struct")))
1556 assert(Lex.getKind() == lltok::lbrace);
1560 if (EatIfPresent(lltok::rbrace))
1571 while (EatIfPresent(lltok::comma)) {
1581 return ParseToken(lltok::rbrace, "expected '}' at end of struct");
1590 if (Lex.getKind() != lltok::APSInt || Lex.getAPSIntVal().isSigned() ||
1598 if (ParseToken(lltok::kw_x, "expected 'x' after element count"))
1605 if (ParseToken(isVector ? lltok::greater : lltok::rsquare,
1896 case lltok::GlobalID: // @42
1900 case lltok::GlobalVar: // @foo
1904 case lltok::LocalVarID: // %42
1908 case lltok::LocalVar: // %foo
1912 case lltok::exclaim: // !42, !{...}, or !"foo"
1914 case lltok::APSInt:
1918 case lltok::APFloat:
1922 case lltok::kw_true:
1926 case lltok::kw_false:
1930 case lltok::kw_null: ID.Kind = ValID::t_Null; break;
1931 case lltok::kw_undef: ID.Kind = ValID::t_Undef; break;
1932 case lltok::kw_zeroinitializer: ID.Kind = ValID::t_Zero; break;
1934 case lltok::lbrace: {
1939 ParseToken(lltok::rbrace, "expected end of struct constant"))
1948 case lltok::less: {
1952 bool isPackedStruct = EatIfPresent(lltok::lbrace);
1958 ParseToken(lltok::rbrace, "expected end of packed struct")) ||
1959 ParseToken(lltok::greater, "expected end of constant"))
1989 case lltok::lsquare: { // Array Constant
1994 ParseToken(lltok::rsquare, "expected end of array constant"))
2023 case lltok::kw_c: // c "foo"
2026 if (ParseToken(lltok::StringConstant, "expected string")) return true;
2030 case lltok::kw_asm: {
2034 if (ParseOptionalToken(lltok::kw_sideeffect, HasSideEffect) ||
2035 ParseOptionalToken(lltok::kw_alignstack, AlignStack) ||
2037 ParseToken(lltok::comma, "expected comma in inline asm expression") ||
2038 ParseToken(lltok::StringConstant, "expected constraint string"))
2046 case lltok::kw_blockaddress: {
2053 if (ParseToken(lltok::lparen, "expected '(' in block address expression") ||
2055 ParseToken(lltok::comma, "expected comma in block address expression")||
2057 ParseToken(lltok::rparen, "expected ')' in block address expression"))
2075 case lltok::kw_trunc:
2076 case lltok::kw_zext:
2077 case lltok::kw_sext:
2078 case lltok::kw_fptrunc:
2079 case lltok::kw_fpext:
2080 case lltok::kw_bitcast:
2081 case lltok::kw_uitofp:
2082 case lltok::kw_sitofp:
2083 case lltok::kw_fptoui:
2084 case lltok::kw_fptosi:
2085 case lltok::kw_inttoptr:
2086 case lltok::kw_ptrtoint: {
2091 if (ParseToken(lltok::lparen, "expected '(' after constantexpr cast") ||
2093 ParseToken(lltok::kw_to, "expected 'to' in constantexpr cast") ||
2095 ParseToken(lltok::rparen, "expected ')' at end of constantexpr cast"))
2106 case lltok::kw_extractvalue: {
2110 if (ParseToken(lltok::lparen, "expected '(' in extractvalue constantexpr")||
2113 ParseToken(lltok::rparen, "expected ')' in extractvalue constantexpr"))
2124 case lltok::kw_insertvalue: {
2128 if (ParseToken(lltok::lparen, "expected '(' in insertvalue constantexpr")||
2130 ParseToken(lltok::comma, "expected comma in insertvalue constantexpr")||
2133 ParseToken(lltok::rparen, "expected ')' in insertvalue constantexpr"))
2143 case lltok::kw_icmp:
2144 case lltok::kw_fcmp: {
2149 ParseToken(lltok::lparen, "expected '(' in compare constantexpr") ||
2151 ParseToken(lltok::comma, "expected comma in compare constantexpr") ||
2153 ParseToken(lltok::rparen, "expected ')' in compare constantexpr"))
2177 case lltok::kw_add:
2178 case lltok::kw_fadd:
2179 case lltok::kw_sub:
2180 case lltok::kw_fsub:
2181 case lltok::kw_mul:
2182 case lltok::kw_fmul:
2183 case lltok::kw_udiv:
2184 case lltok::kw_sdiv:
2185 case lltok::kw_fdiv:
2186 case lltok::kw_urem:
2187 case lltok::kw_srem:
2188 case lltok::kw_frem:
2189 case lltok::kw_shl:
2190 case lltok::kw_lshr:
2191 case lltok::kw_ashr: {
2201 if (EatIfPresent(lltok::kw_nuw))
2203 if (EatIfPresent(lltok::kw_nsw)) {
2205 if (EatIfPresent(lltok::kw_nuw))
2210 if (EatIfPresent(lltok::kw_exact))
2213 if (ParseToken(lltok::lparen, "expected '(' in binary constantexpr") ||
2215 ParseToken(lltok::comma, "expected comma in binary constantexpr") ||
2217 ParseToken(lltok::rparen, "expected ')' in binary constantexpr"))
2263 case lltok::kw_and:
2264 case lltok::kw_or:
2265 case lltok::kw_xor: {
2269 if (ParseToken(lltok::lparen, "expected '(' in logical constantexpr") ||
2271 ParseToken(lltok::comma, "expected comma in logical constantexpr") ||
2273 ParseToken(lltok::rparen, "expected ')' in logical constantexpr"))
2285 case lltok::kw_getelementptr:
2286 case lltok::kw_shufflevector:
2287 case lltok::kw_insertelement:
2288 case lltok::kw_extractelement:
2289 case lltok::kw_select: {
2295 InBounds = EatIfPresent(lltok::kw_inbounds);
2296 if (ParseToken(lltok::lparen, "expected '(' in constantexpr") ||
2298 ParseToken(lltok::rparen, "expected ')' in constantexpr"))
2372 if (Lex.getKind() == lltok::rbrace ||
2373 Lex.getKind() == lltok::rsquare ||
2374 Lex.getKind() == lltok::greater ||
2375 Lex.getKind() == lltok::rparen)
2382 while (EatIfPresent(lltok::comma)) {
2391 assert(Lex.getKind() == lltok::lbrace);
2396 ParseToken(lltok::rbrace, "expected end of metadata node"))
2409 assert(Lex.getKind() == lltok::exclaim);
2414 if (Lex.getKind() == lltok::lbrace)
2419 if (Lex.getKind() == lltok::APSInt) {
2633 if (Lex.getKind() == lltok::GlobalVar) {
2635 } else if (Lex.getKind() == lltok::GlobalID) { // @42 is ok.
2647 if (Lex.getKind() != lltok::lparen)
2660 ParseOptionalToken(lltok::kw_unnamed_addr, UnnamedAddr,
2663 (EatIfPresent(lltok::kw_section) &&
2666 (EatIfPresent(lltok::kw_gc) &&
2776 if (Lex.getKind() != lltok::lbrace)
2786 if (Lex.getKind() == lltok::rbrace)
2789 while (Lex.getKind() != lltok::rbrace)
2805 if (Lex.getKind() == lltok::LabelStr) {
2825 if (Lex.getKind() == lltok::LocalVarID) {
2828 if (ParseToken(lltok::equal, "expected '=' after instruction id"))
2830 } else if (Lex.getKind() == lltok::LocalVar) {
2833 if (ParseToken(lltok::equal, "expected '=' after instruction name"))
2845 if (EatIfPresent(lltok::comma))
2874 lltok::Kind Token = Lex.getKind();
2875 if (Token == lltok::Eof)
2884 case lltok::kw_unwind: Inst = new UnwindInst(Context); return false;
2885 case lltok::kw_unreachable: Inst = new UnreachableInst(Context); return false;
2886 case lltok::kw_ret: return ParseRet(Inst, BB, PFS);
2887 case lltok::kw_br: return ParseBr(Inst, PFS);
2888 case lltok::kw_switch: return ParseSwitch(Inst, PFS);
2889 case lltok::kw_indirectbr: return ParseIndirectBr(Inst, PFS);
2890 case lltok::kw_invoke: return ParseInvoke(Inst, PFS);
2891 case lltok::kw_resume: return ParseResume(Inst, PFS);
2893 case lltok::kw_add:
2894 case lltok::kw_sub:
2895 case lltok::kw_mul:
2896 case lltok::kw_shl: {
2897 bool NUW = EatIfPresent(lltok::kw_nuw);
2898 bool NSW = EatIfPresent(lltok::kw_nsw);
2899 if (!NUW) NUW = EatIfPresent(lltok::kw_nuw);
2907 case lltok::kw_fadd:
2908 case lltok::kw_fsub:
2909 case lltok::kw_fmul: return ParseArithmetic(Inst, PFS, KeywordVal, 2);
2911 case lltok::kw_sdiv:
2912 case lltok::kw_udiv:
2913 case lltok::kw_lshr:
2914 case lltok::kw_ashr: {
2915 bool Exact = EatIfPresent(lltok::kw_exact);
2922 case lltok::kw_urem:
2923 case lltok::kw_srem: return ParseArithmetic(Inst, PFS, KeywordVal, 1);
2924 case lltok::kw_fdiv:
2925 case lltok::kw_frem: return ParseArithmetic(Inst, PFS, KeywordVal, 2);
2926 case lltok::kw_and:
2927 case lltok::kw_or:
2928 case lltok::kw_xor: return ParseLogical(Inst, PFS, KeywordVal);
2929 case lltok::kw_icmp:
2930 case lltok::kw_fcmp: return ParseCompare(Inst, PFS, KeywordVal);
2932 case lltok::kw_trunc:
2933 case lltok::kw_zext:
2934 case lltok::kw_sext:
2935 case lltok::kw_fptrunc:
2936 case lltok::kw_fpext:
2937 case lltok::kw_bitcast:
2938 case lltok::kw_uitofp:
2939 case lltok::kw_sitofp:
2940 case lltok::kw_fptoui:
2941 case lltok::kw_fptosi:
2942 case lltok::kw_inttoptr:
2943 case lltok::kw_ptrtoint: return ParseCast(Inst, PFS, KeywordVal);
2945 case lltok::kw_select: return ParseSelect(Inst, PFS);
2946 case lltok::kw_va_arg: return ParseVA_Arg(Inst, PFS);
2947 case lltok::kw_extractelement: return ParseExtractElement(Inst, PFS);
2948 case lltok::kw_insertelement: return ParseInsertElement(Inst, PFS);
2949 case lltok::kw_shufflevector: return ParseShuffleVector(Inst, PFS);
2950 case lltok::kw_phi: return ParsePHI(Inst, PFS);
2951 case lltok::kw_landingpad: return ParseLandingPad(Inst, PFS);
2952 case lltok::kw_call: return ParseCall(Inst, PFS, false);
2953 case lltok::kw_tail: return ParseCall(Inst, PFS, true);
2955 case lltok::kw_alloca: return ParseAlloc(Inst, PFS);
2956 case lltok::kw_load: return ParseLoad(Inst, PFS, false);
2957 case lltok::kw_store: return ParseStore(Inst, PFS, false);
2958 case lltok::kw_cmpxchg: return ParseCmpXchg(Inst, PFS);
2959 case lltok::kw_atomicrmw: return ParseAtomicRMW(Inst, PFS);
2960 case lltok::kw_fence: return ParseFence(Inst, PFS);
2961 case lltok::kw_volatile:
2963 if (EatIfPresent(lltok::kw_load))
2965 else if (EatIfPresent(lltok::kw_store))
2969 case lltok::kw_getelementptr: return ParseGetElementPtr(Inst, PFS);
2970 case lltok::kw_extractvalue: return ParseExtractValue(Inst, PFS);
2971 case lltok::kw_insertvalue: return ParseInsertValue(Inst, PFS);
2980 case lltok::kw_oeq: P = CmpInst::FCMP_OEQ; break;
2981 case lltok::kw_one: P = CmpInst::FCMP_ONE; break;
2982 case lltok::kw_olt: P = CmpInst::FCMP_OLT; break;
2983 case lltok::kw_ogt: P = CmpInst::FCMP_OGT; break;
2984 case lltok::kw_ole: P = CmpInst::FCMP_OLE; break;
2985 case lltok::kw_oge: P = CmpInst::FCMP_OGE; break;
2986 case lltok::kw_ord: P = CmpInst::FCMP_ORD; break;
2987 case lltok::kw_uno: P = CmpInst::FCMP_UNO; break;
2988 case lltok::kw_ueq: P = CmpInst::FCMP_UEQ; break;
2989 case lltok::kw_une: P = CmpInst::FCMP_UNE; break;
2990 case lltok::kw_ult: P = CmpInst::FCMP_ULT; break;
2991 case lltok::kw_ugt: P = CmpInst::FCMP_UGT; break;
2992 case lltok::kw_ule: P = CmpInst::FCMP_ULE; break;
2993 case lltok::kw_uge: P = CmpInst::FCMP_UGE; break;
2994 case lltok::kw_true: P = CmpInst::FCMP_TRUE; break;
2995 case lltok::kw_false: P = CmpInst::FCMP_FALSE; break;
3000 case lltok::kw_eq: P = CmpInst::ICMP_EQ; break;
3001 case lltok::kw_ne: P = CmpInst::ICMP_NE; break;
3002 case lltok::kw_slt: P = CmpInst::ICMP_SLT; break;
3003 case lltok::kw_sgt: P = CmpInst::ICMP_SGT; break;
3004 case lltok::kw_sle: P = CmpInst::ICMP_SLE; break;
3005 case lltok::kw_sge: P = CmpInst::ICMP_SGE; break;
3006 case lltok::kw_ult: P = CmpInst::ICMP_ULT; break;
3007 case lltok::kw_ugt: P = CmpInst::ICMP_UGT; break;
3008 case lltok::kw_ule: P = CmpInst::ICMP_ULE; break;
3009 case lltok::kw_uge: P = CmpInst::ICMP_UGE; break;
3069 if (ParseToken(lltok::comma, "expected ',' after branch condition") ||
3071 ParseToken(lltok::comma, "expected ',' after true destination") ||
3089 ParseToken(lltok::comma, "expected ',' after switch condition") ||
3091 ParseToken(lltok::lsquare, "expected '[' with switch table"))
3100 while (Lex.getKind() != lltok::rsquare) {
3105 ParseToken(lltok::comma, "expected ',' after case value") ||
3133 ParseToken(lltok::comma, "expected ',' after indirectbr address") ||
3134 ParseToken(lltok::lsquare, "expected '[' with indirectbr"))
3143 if (Lex.getKind() != lltok::rsquare) {
3149 while (EatIfPresent(lltok::comma)) {
3156 if (ParseToken(lltok::rsquare, "expected ']' at end of block list"))
3186 ParseToken(lltok::kw_to, "expected 'to' in invoke") ||
3188 ParseToken(lltok::kw_unwind, "expected 'unwind' in invoke") ||
3283 ParseToken(lltok::comma, "expected ',' in arithmetic operation") ||
3311 ParseToken(lltok::comma, "expected ',' in logical operation") ||
3334 ParseToken(lltok::comma, "expected ',' after compare value") ||
3365 ParseToken(lltok::kw_to, "expected 'to' after cast value") ||
3385 ParseToken(lltok::comma, "expected ',' after select condition") ||
3387 ParseToken(lltok::comma, "expected ',' after select value") ||
3405 ParseToken(lltok::comma, "expected ',' after vaarg operand") ||
3422 ParseToken(lltok::comma, "expected ',' after extract value") ||
3439 ParseToken(lltok::comma, "expected ',' after insertelement value") ||
3441 ParseToken(lltok::comma, "expected ',' after insertelement value") ||
3458 ParseToken(lltok::comma, "expected ',' after shuffle mask") ||
3460 ParseToken(lltok::comma, "expected ',' after shuffle value") ||
3478 ParseToken(lltok::lsquare, "expected '[' in phi value list") ||
3480 ParseToken(lltok::comma, "expected ',' after insertelement value") ||
3482 ParseToken(lltok::rsquare, "expected ']' in phi value list"))
3490 if (!EatIfPresent(lltok::comma))
3493 if (Lex.getKind() == lltok::MetadataVar) {
3498 if (ParseToken(lltok::lsquare, "expected '[' in phi value list") ||
3500 ParseToken(lltok::comma, "expected ',' after insertelement value") ||
3502 ParseToken(lltok::rsquare, "expected ']' in phi value list"))
3527 ParseToken(lltok::kw_personality, "expected 'personality'") ||
3532 LP->setCleanup(EatIfPresent(lltok::kw_cleanup));
3534 while (Lex.getKind() == lltok::kw_catch || Lex.getKind() == lltok::kw_filter){
3536 if (EatIfPresent(lltok::kw_catch))
3538 else if (EatIfPresent(lltok::kw_filter))
3579 if ((isTail && ParseToken(lltok::kw_call, "expected 'tail call'")) ||
3669 if (EatIfPresent(lltok::comma)) {
3670 if (Lex.getKind() == lltok::kw_align) {
3672 } else if (Lex.getKind() == lltok::MetadataVar) {
3703 if (Lex.getKind() == lltok::kw_atomic) {
3710 if (Lex.getKind() == lltok::kw_volatile) {
3750 if (Lex.getKind() == lltok::kw_atomic) {
3757 if (Lex.getKind() == lltok::kw_volatile) {
3765 ParseToken(lltok::comma, "expected ',' after store operand") ||
3796 if (EatIfPresent(lltok::kw_volatile))
3800 ParseToken(lltok::comma, "expected ',' after cmpxchg address") ||
3802 ParseToken(lltok::comma, "expected ',' after cmpxchg cmp operand") ||
3840 if (EatIfPresent(lltok::kw_volatile))
3845 case lltok::kw_xchg: Operation = AtomicRMWInst::Xchg; break;
3846 case lltok::kw_add: Operation = AtomicRMWInst::Add; break;
3847 case lltok::kw_sub: Operation = AtomicRMWInst::Sub; break;
3848 case lltok::kw_and: Operation = AtomicRMWInst::And; break;
3849 case lltok::kw_nand: Operation = AtomicRMWInst::Nand; break;
3850 case lltok::kw_or: Operation = AtomicRMWInst::Or; break;
3851 case lltok::kw_xor: Operation = AtomicRMWInst::Xor; break;
3852 case lltok::kw_max: Operation = AtomicRMWInst::Max; break;
3853 case lltok::kw_min: Operation = AtomicRMWInst::Min; break;
3854 case lltok::kw_umax: Operation = AtomicRMWInst::UMax; break;
3855 case lltok::kw_umin: Operation = AtomicRMWInst::UMin; break;
3860 ParseToken(lltok::comma, "expected ',' after atomicrmw address") ||
3907 bool InBounds = EatIfPresent(lltok::kw_inbounds);
3916 while (EatIfPresent(lltok::comma)) {
3917 if (Lex.getKind() == lltok::MetadataVar) {
3961 ParseToken(lltok::comma, "expected comma after insertvalue operand") ||
3986 if (Lex.getKind() == lltok::rbrace)
3991 if (EatIfPresent(lltok::kw_null)) {
3999 } while (EatIfPresent(lltok::comma));