Skip to content

Commit cfd3e09

Browse files
committed
[Parser] Make PersistentParserState parameter optional and remove it from the constructor that accepts a StringRef fragment.
Swift SVN r6592
1 parent 91a25ed commit cfd3e09

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/swift/Parse/Parser.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ class Parser {
132132
public:
133133
Parser(unsigned BufferID, TranslationUnit *TU,
134134
bool IsMainModule, SILParserState *SIL,
135-
PersistentParserState *PersistentState);
135+
PersistentParserState *PersistentState = nullptr);
136136
Parser(TranslationUnit *TU, llvm::StringRef fragment, DiagnosticEngine &Diags,
137-
SILParserState *SIL, PersistentParserState *PersistentState = nullptr);
137+
SILParserState *SIL);
138138
~Parser();
139139

140140
bool isInSILMode() const { return SIL != nullptr; }

lib/Parse/Parser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ Parser::Parser(unsigned BufferID, TranslationUnit *TU,
239239

240240
Parser::Parser(TranslationUnit *TU,
241241
llvm::StringRef fragment, DiagnosticEngine &Diags,
242-
SILParserState *SIL, PersistentParserState *PersistentState)
242+
SILParserState *SIL)
243243
: Parser(new Lexer(fragment, SourceMgr, &Diags, SIL != nullptr),
244-
TU, Diags, SIL, PersistentState) {
244+
TU, Diags, SIL, /*PersistentState=*/nullptr) {
245245
}
246246

247247
Parser::~Parser() {

0 commit comments

Comments
 (0)