@@ -78,18 +78,15 @@ class SourceFile final : public FileUnit {
7878 // / and the associated language option.
7979 DisablePoundIfEvaluation = 1 << 1 ,
8080
81- // / Whether to build a syntax tree.
82- BuildSyntaxTree = 1 << 2 ,
83-
8481 // / Whether to save the file's parsed tokens.
85- CollectParsedTokens = 1 << 3 ,
82+ CollectParsedTokens = 1 << 2 ,
8683
8784 // / Whether to compute the interface hash of the file.
88- EnableInterfaceHash = 1 << 4 ,
85+ EnableInterfaceHash = 1 << 3 ,
8986
9087 // / Whether to suppress warnings when parsing. This is set for secondary
9188 // / files, as they get parsed multiple times.
92- SuppressWarnings = 1 << 5 ,
89+ SuppressWarnings = 1 << 4 ,
9390 };
9491 using ParsingOptions = OptionSet<ParsingFlags>;
9592
@@ -248,10 +245,6 @@ class SourceFile final : public FileUnit {
248245 // / code for it. Note this method returns \c false in WMO.
249246 bool isPrimary () const { return IsPrimary; }
250247
251- // / A cache of syntax nodes that can be reused when creating the syntax tree
252- // / for this file.
253- swift::SyntaxParsingCache *SyntaxParsingCache = nullptr ;
254-
255248 // / The list of local type declarations in the source file.
256249 llvm::SetVector<TypeDecl *> LocalTypeDecls;
257250
@@ -633,14 +626,10 @@ class SourceFile final : public FileUnit {
633626 // / them to be accessed from \c getAllTokens.
634627 bool shouldCollectTokens () const ;
635628
636- bool shouldBuildSyntaxTree () const ;
637-
638629 // / Whether the bodies of types and functions within this file can be lazily
639630 // / parsed.
640631 bool hasDelayedBodyParsing () const ;
641632
642- syntax::SourceFileSyntax getSyntaxRoot () const ;
643-
644633 OpaqueTypeDecl *lookupOpaqueResultType (StringRef MangledName) override ;
645634
646635 // / Do not call when inside an inactive clause (\c
@@ -660,9 +649,6 @@ class SourceFile final : public FileUnit {
660649 // / If not \c None, the underlying vector contains the parsed tokens of this
661650 // / source file.
662651 Optional<ArrayRef<Token>> AllCollectedTokens;
663-
664- // / The root of the syntax tree representing the source file.
665- std::unique_ptr<syntax::SourceFileSyntax> SyntaxRoot;
666652};
667653
668654inline SourceFile::ParsingOptions operator |(SourceFile::ParsingFlags lhs,
0 commit comments