@@ -7601,16 +7601,18 @@ bool SILParserState::parseSILGlobal(Parser &P) {
7601
7601
SILType GlobalType;
7602
7602
SourceLoc NameLoc;
7603
7603
SerializedKind_t isSerialized = IsNotSerialized;
7604
+ bool isMarkedAsUsed = false ;
7604
7605
bool isLet = false ;
7605
7606
7606
7607
SILParser State (P);
7607
7608
if (parseSILLinkage (GlobalLinkage, P) ||
7608
7609
parseDeclSILOptional (nullptr , &isSerialized, nullptr , nullptr , nullptr ,
7609
7610
nullptr , nullptr , nullptr , nullptr , nullptr , nullptr ,
7610
7611
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) ||
7614
7616
P.parseToken (tok::at_sign, diag::expected_sil_value_name) ||
7615
7617
P.parseIdentifier (GlobalName, NameLoc, /* diagnoseDollarPrefix=*/ false ,
7616
7618
diag::expected_sil_value_name) ||
@@ -7636,6 +7638,7 @@ bool SILParserState::parseSILGlobal(Parser &P) {
7636
7638
RegularLocation (NameLoc), VD.value ());
7637
7639
7638
7640
GV->setLet (isLet);
7641
+ GV->setMarkedAsUsed (isMarkedAsUsed);
7639
7642
// Parse static initializer if exists.
7640
7643
if (State.P .consumeIf (tok::equal) && State.P .consumeIf (tok::l_brace)) {
7641
7644
SILBuilder B (GV);
0 commit comments