mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
FrontendTool: parse all delayed member decls when we're dumping parse tree or verifying parse diagnostics.
This commit is contained in:
@@ -925,7 +925,8 @@ SourceFile *CompilerInstance::createSourceFileForMainModule(
|
||||
return inputFile;
|
||||
}
|
||||
|
||||
void CompilerInstance::performParseOnly(bool EvaluateConditionals) {
|
||||
void CompilerInstance::performParseOnly(bool EvaluateConditionals,
|
||||
bool ParseDelayedBodyOnEnd) {
|
||||
const InputFileKind Kind = Invocation.getInputKind();
|
||||
ModuleDecl *const MainModule = getMainModule();
|
||||
Context->LoadedModules[MainModule->getName()] = MainModule;
|
||||
@@ -947,6 +948,10 @@ void CompilerInstance::performParseOnly(bool EvaluateConditionals) {
|
||||
}
|
||||
|
||||
PersistentParserState PersistentState(getASTContext());
|
||||
SWIFT_DEFER {
|
||||
if (ParseDelayedBodyOnEnd)
|
||||
PersistentState.parseAllDelayedDeclLists();
|
||||
};
|
||||
PersistentState.PerformConditionEvaluation = EvaluateConditionals;
|
||||
// Parse all the library files.
|
||||
for (auto BufferID : InputSourceCodeBufferIDs) {
|
||||
|
||||
Reference in New Issue
Block a user