@@ -7601,16 +7601,18 @@ bool SILParserState::parseSILGlobal(Parser &P) {
76017601 SILType GlobalType;
76027602 SourceLoc NameLoc;
76037603 SerializedKind_t isSerialized = IsNotSerialized;
7604+ bool isMarkedAsUsed = false ;
76047605 bool isLet = false ;
76057606
76067607 SILParser State (P);
76077608 if (parseSILLinkage (GlobalLinkage, P) ||
76087609 parseDeclSILOptional (nullptr , &isSerialized, nullptr , nullptr , nullptr ,
76097610 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
76107611 nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7611- nullptr , nullptr , nullptr , nullptr , nullptr , &isLet,
7612- nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7613- nullptr , nullptr , nullptr , nullptr , State, M) ||
7612+ nullptr , nullptr , nullptr , &isMarkedAsUsed, nullptr ,
7613+ &isLet, nullptr , nullptr , nullptr , nullptr , nullptr ,
7614+ nullptr , nullptr , nullptr , nullptr , nullptr , State,
7615+ M) ||
76147616 P.parseToken (tok::at_sign, diag::expected_sil_value_name) ||
76157617 P.parseIdentifier (GlobalName, NameLoc, /* diagnoseDollarPrefix=*/ false ,
76167618 diag::expected_sil_value_name) ||
@@ -7636,6 +7638,7 @@ bool SILParserState::parseSILGlobal(Parser &P) {
76367638 RegularLocation (NameLoc), VD.value ());
76377639
76387640 GV->setLet (isLet);
7641+ GV->setMarkedAsUsed (isMarkedAsUsed);
76397642 // Parse static initializer if exists.
76407643 if (State.P .consumeIf (tok::equal) && State.P .consumeIf (tok::l_brace)) {
76417644 SILBuilder B (GV);
0 commit comments