46 IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem> OverlayFS);
60 void handleModuleFile(serialization::ModuleFile *MF);
61 void parseToLocation(SourceLocation Loc);
64 void FileChanged(SourceLocation Loc, FileChangeReason Reason,
65 SrcMgr::CharacteristicKind FileType,
66 FileID PrevFID)
override;
68 void InclusionDirective(SourceLocation DirectiveLoc,
69 const Token &IncludeToken, StringRef IncludedFilename,
70 bool IsAngled, CharSourceRange FilenameRange,
71 OptionalFileEntryRef IncludedFile,
72 StringRef SearchPath, StringRef RelativePath,
73 const Module *SuggestedModule,
bool ModuleImported,
74 SrcMgr::CharacteristicKind FileType)
override;
76 void EndOfMainFile()
override;
81 void Ident(SourceLocation Loc, StringRef)
override;
82 void PragmaDirective(SourceLocation Loc, PragmaIntroducerKind)
override;
83 void PragmaComment(SourceLocation Loc,
const IdentifierInfo *,
85 void PragmaDetectMismatch(SourceLocation Loc, StringRef, StringRef)
override;
86 void PragmaDebug(SourceLocation Loc, StringRef)
override;
87 void PragmaMessage(SourceLocation Loc, StringRef, PragmaMessageKind,
89 void PragmaDiagnosticPush(SourceLocation Loc, StringRef)
override;
90 void PragmaDiagnosticPop(SourceLocation Loc, StringRef)
override;
91 void PragmaDiagnostic(SourceLocation Loc, StringRef, diag::Severity,
93 void HasInclude(SourceLocation Loc, StringRef,
bool, OptionalFileEntryRef,
94 SrcMgr::CharacteristicKind)
override;
95 void PragmaOpenCLExtension(SourceLocation NameLoc,
const IdentifierInfo *,
96 SourceLocation StateLoc,
unsigned)
override;
97 void PragmaWarning(SourceLocation Loc, PragmaWarningSpecifier,
98 ArrayRef<int>)
override;
99 void PragmaWarningPush(SourceLocation Loc,
int)
override;
100 void PragmaWarningPop(SourceLocation Loc)
override;
101 void PragmaAssumeNonNullBegin(SourceLocation Loc)
override;
102 void PragmaAssumeNonNullEnd(SourceLocation Loc)
override;
103 void MacroExpands(
const Token &MacroNameTok,
const MacroDefinition &,
104 SourceRange Range,
const MacroArgs *)
override;
105 void MacroDefined(
const Token &MacroNameTok,
106 const MacroDirective *MD)
override;
107 void MacroUndefined(
const Token &,
const MacroDefinition &,
108 const MacroDirective *Undef)
override;
109 void Defined(
const Token &MacroNameTok,
const MacroDefinition &,
110 SourceRange Range)
override;
111 void SourceRangeSkipped(SourceRange Range, SourceLocation EndifLoc)
override;
112 void If(SourceLocation Loc, SourceRange, ConditionValueKind)
override;
113 void Elif(SourceLocation Loc, SourceRange, ConditionValueKind,
114 SourceLocation)
override;
115 void Ifdef(SourceLocation Loc,
const Token &,
116 const MacroDefinition &)
override;
117 void Ifndef(SourceLocation Loc,
const Token &,
118 const MacroDefinition &)
override;
119 void Else(SourceLocation Loc, SourceLocation)
override;
120 void Endif(SourceLocation Loc, SourceLocation)
override;
122 std::unique_ptr<FileRecorder> Recorder;
124 llvm::DenseSet<serialization::ModuleFile *> VisitedModules;
126 CompilerInstance &Compiler;
128 llvm::IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem> InMemoryFs;
130 SourceManager &Sources;
131 DiagnosticOptions DiagOpts;
132 DiagnosticsEngine Diags;
133 LangOptions LangOpts;
134 HeaderSearchOptions HSOpts;
135 TrivialModuleLoader ModuleLoader;
137 std::unique_ptr<HeaderSearch> HeaderInfo;
138 std::unique_ptr<Preprocessor> PP;
139 bool EnteredMainFile =
false;
140 bool StartedLexing =
false;