@@ -675,7 +675,7 @@ static bool parseDeclSILOptional(
675675 UseStackForPackMetadata_t *useStackForPackMetadata,
676676 bool *hasUnsafeNonEscapableResult, IsExactSelfClass_t *isExactSelfClass,
677677 SILFunction **dynamicallyReplacedFunction,
678- SILFunction **usedAdHocRequirementWitness, Identifier *objCReplacementFor,
678+ Identifier *objCReplacementFor,
679679 SILFunction::Purpose *specialPurpose, Inline_t *inlineStrategy,
680680 OptimizationMode *optimizationMode, PerformanceConstraints *perfConstraints,
681681 bool *isPerformanceConstraint,
@@ -825,26 +825,6 @@ static bool parseDeclSILOptional(
825825 *dynamicallyReplacedFunction = Func;
826826 SP.P .consumeToken (tok::string_literal);
827827
828- SP.P .parseToken (tok::r_square, diag::expected_in_attribute_list);
829- continue ;
830- } else if (usedAdHocRequirementWitness && SP.P .Tok .getText () == " ref_adhoc_requirement_witness" ) {
831- SP.P .consumeToken (tok::identifier);
832- if (SP.P .Tok .getKind () != tok::string_literal) {
833- SP.P .diagnose (SP.P .Tok , diag::expected_in_attribute_list);
834- return true ;
835- }
836- // Drop the double quotes.
837- StringRef witnessFunc = SP.P .Tok .getText ().drop_front ().drop_back ();
838- SILFunction *Func = M.lookUpFunction (witnessFunc.str ());
839- if (!Func) {
840- Identifier Id = SP.P .Context .getIdentifier (witnessFunc);
841- SP.P .diagnose (SP.P .Tok , diag::sil_adhoc_requirement_witness_func_not_found,
842- Id);
843- return true ;
844- }
845- *usedAdHocRequirementWitness = Func;
846- SP.P .consumeToken (tok::string_literal);
847-
848828 SP.P .parseToken (tok::r_square, diag::expected_in_attribute_list);
849829 continue ;
850830 } else if (objCReplacementFor &&
@@ -7061,7 +7041,6 @@ bool SILParserState::parseDeclSIL(Parser &P) {
70617041 ValueDecl *ClangDecl = nullptr ;
70627042 EffectsKind MRK = EffectsKind::Unspecified;
70637043 SILFunction *DynamicallyReplacedFunction = nullptr ;
7064- SILFunction *AdHocWitnessFunction = nullptr ;
70657044 Identifier objCReplacementFor;
70667045 if (parseSILLinkage (FnLinkage, P) ||
70677046 parseDeclSILOptional (
@@ -7070,7 +7049,7 @@ bool SILParserState::parseDeclSIL(Parser &P) {
70707049 &isRuntimeAccessible, &forceEnableLexicalLifetimes,
70717050 &useStackForPackMetadata, &hasUnsafeNonEscapableResult,
70727051 &isExactSelfClass, &DynamicallyReplacedFunction,
7073- &AdHocWitnessFunction, & objCReplacementFor, &specialPurpose,
7052+ &objCReplacementFor, &specialPurpose,
70747053 &inlineStrategy, &optimizationMode, &perfConstr,
70757054 &isPerformanceConstraint, &markedAsUsed,
70767055 §ion, nullptr , &isWeakImported, &needStackProtection,
@@ -7116,8 +7095,6 @@ bool SILParserState::parseDeclSIL(Parser &P) {
71167095 FunctionState.F ->setIsExactSelfClass (isExactSelfClass);
71177096 FunctionState.F ->setDynamicallyReplacedFunction (
71187097 DynamicallyReplacedFunction);
7119- FunctionState.F ->setReferencedAdHocRequirementWitnessFunction (
7120- AdHocWitnessFunction);
71217098 if (!objCReplacementFor.empty ())
71227099 FunctionState.F ->setObjCReplacement (objCReplacementFor);
71237100 FunctionState.F ->setSpecialPurpose (specialPurpose);
@@ -7327,7 +7304,7 @@ bool SILParserState::parseSILGlobal(Parser &P) {
73277304 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
73287305 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
73297306 nullptr ,
7330- nullptr , nullptr , nullptr , nullptr , nullptr , &isLet,
7307+ nullptr , nullptr , nullptr , nullptr , &isLet,
73317308 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
73327309 nullptr , nullptr , State, M) ||
73337310 P.parseToken (tok::at_sign, diag::expected_sil_value_name) ||
@@ -7381,7 +7358,7 @@ bool SILParserState::parseSILProperty(Parser &P) {
73817358 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
73827359 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
73837360 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7384- nullptr , nullptr , nullptr , SP, M))
7361+ nullptr , nullptr , SP, M))
73857362 return true ;
73867363
73877364 ValueDecl *VD;
@@ -7451,7 +7428,7 @@ bool SILParserState::parseSILVTable(Parser &P) {
74517428 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
74527429 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
74537430 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7454- nullptr , nullptr , nullptr , VTableState, M))
7431+ nullptr , nullptr , VTableState, M))
74557432 return true ;
74567433
74577434 // Parse the class name.
@@ -7562,7 +7539,7 @@ bool SILParserState::parseSILMoveOnlyDeinit(Parser &parser) {
75627539 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
75637540 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
75647541 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7565- nullptr , nullptr , nullptr , moveOnlyDeinitTableState, M))
7542+ nullptr , nullptr , moveOnlyDeinitTableState, M))
75667543 return true ;
75677544
75687545 // Parse the class name.
@@ -8049,7 +8026,7 @@ bool SILParserState::parseSILWitnessTable(Parser &P) {
80498026 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
80508027 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
80518028 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
8052- nullptr , nullptr , nullptr , WitnessState, M))
8029+ nullptr , nullptr , WitnessState, M))
80538030 return true ;
80548031
80558032 // Parse the protocol conformance.
0 commit comments