File indexing completed on 2026-05-10 08:36:55
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_CLANG_FRONTEND_COMPILERINSTANCE_H_
0010 #define LLVM_CLANG_FRONTEND_COMPILERINSTANCE_H_
0011
0012 #include "clang/AST/ASTConsumer.h"
0013 #include "clang/Basic/Diagnostic.h"
0014 #include "clang/Basic/SourceManager.h"
0015 #include "clang/Basic/TargetInfo.h"
0016 #include "clang/Frontend/CompilerInvocation.h"
0017 #include "clang/Frontend/PCHContainerOperations.h"
0018 #include "clang/Frontend/Utils.h"
0019 #include "clang/Lex/HeaderSearchOptions.h"
0020 #include "clang/Lex/ModuleLoader.h"
0021 #include "llvm/ADT/ArrayRef.h"
0022 #include "llvm/ADT/DenseMap.h"
0023 #include "llvm/ADT/IntrusiveRefCntPtr.h"
0024 #include "llvm/ADT/StringRef.h"
0025 #include "llvm/Support/BuryPointer.h"
0026 #include "llvm/Support/FileSystem.h"
0027 #include "llvm/Support/VirtualFileSystem.h"
0028 #include <cassert>
0029 #include <list>
0030 #include <memory>
0031 #include <optional>
0032 #include <string>
0033 #include <utility>
0034
0035 namespace llvm {
0036 class raw_fd_ostream;
0037 class Timer;
0038 class TimerGroup;
0039 }
0040
0041 namespace clang {
0042 class ASTContext;
0043 class ASTReader;
0044
0045 namespace serialization {
0046 class ModuleFile;
0047 }
0048
0049 class CodeCompleteConsumer;
0050 class DiagnosticsEngine;
0051 class DiagnosticConsumer;
0052 class FileManager;
0053 class FrontendAction;
0054 class InMemoryModuleCache;
0055 class Module;
0056 class Preprocessor;
0057 class Sema;
0058 class SourceManager;
0059 class TargetInfo;
0060 enum class DisableValidationForModuleKind;
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080 class CompilerInstance : public ModuleLoader {
0081
0082 std::shared_ptr<CompilerInvocation> Invocation;
0083
0084
0085 IntrusiveRefCntPtr<DiagnosticsEngine> Diagnostics;
0086
0087
0088 IntrusiveRefCntPtr<TargetInfo> Target;
0089
0090
0091 IntrusiveRefCntPtr<TargetInfo> AuxTarget;
0092
0093
0094 IntrusiveRefCntPtr<FileManager> FileMgr;
0095
0096
0097 IntrusiveRefCntPtr<SourceManager> SourceMgr;
0098
0099
0100 IntrusiveRefCntPtr<InMemoryModuleCache> ModuleCache;
0101
0102
0103 std::shared_ptr<Preprocessor> PP;
0104
0105
0106 IntrusiveRefCntPtr<ASTContext> Context;
0107
0108
0109 IntrusiveRefCntPtr<ExternalSemaSource> ExternalSemaSrc;
0110
0111
0112 std::unique_ptr<ASTConsumer> Consumer;
0113
0114
0115 std::unique_ptr<CodeCompleteConsumer> CompletionConsumer;
0116
0117
0118 std::unique_ptr<Sema> TheSema;
0119
0120
0121 std::unique_ptr<llvm::TimerGroup> timerGroup;
0122
0123
0124 std::unique_ptr<llvm::Timer> FrontendTimer;
0125
0126
0127 IntrusiveRefCntPtr<ASTReader> TheASTReader;
0128
0129
0130 std::shared_ptr<ModuleDependencyCollector> ModuleDepCollector;
0131
0132
0133 std::shared_ptr<PCHContainerOperations> ThePCHContainerOperations;
0134
0135 std::vector<std::shared_ptr<DependencyCollector>> DependencyCollectors;
0136
0137
0138 class FailedModulesSet {
0139 llvm::StringSet<> Failed;
0140
0141 public:
0142 bool hasAlreadyFailed(StringRef module) { return Failed.count(module) > 0; }
0143
0144 void addFailed(StringRef module) { Failed.insert(module); }
0145 };
0146
0147
0148
0149
0150
0151
0152
0153 std::shared_ptr<FailedModulesSet> FailedModules;
0154
0155
0156
0157 std::map<std::string, std::string, std::less<>> BuiltModules;
0158
0159
0160 bool DeleteBuiltModules = true;
0161
0162
0163
0164 SourceLocation LastModuleImportLoc;
0165
0166
0167
0168 ModuleLoadResult LastModuleImportResult;
0169
0170
0171
0172 bool BuildGlobalModuleIndex = false;
0173
0174
0175 bool HaveFullGlobalModuleIndex = false;
0176
0177
0178 bool DisableGeneratingGlobalModuleIndex = false;
0179
0180
0181 std::unique_ptr<raw_ostream> OwnedVerboseOutputStream;
0182
0183
0184 raw_ostream *VerboseOutputStream = &llvm::errs();
0185
0186
0187
0188
0189
0190
0191 struct OutputFile {
0192 std::string Filename;
0193 std::optional<llvm::sys::fs::TempFile> File;
0194
0195 OutputFile(std::string filename,
0196 std::optional<llvm::sys::fs::TempFile> file)
0197 : Filename(std::move(filename)), File(std::move(file)) {}
0198 };
0199
0200
0201 std::list<OutputFile> OutputFiles;
0202
0203
0204 std::unique_ptr<llvm::raw_pwrite_stream> OutputStream;
0205
0206 CompilerInstance(const CompilerInstance &) = delete;
0207 void operator=(const CompilerInstance &) = delete;
0208 public:
0209 explicit CompilerInstance(
0210 std::shared_ptr<PCHContainerOperations> PCHContainerOps =
0211 std::make_shared<PCHContainerOperations>(),
0212 InMemoryModuleCache *SharedModuleCache = nullptr);
0213 ~CompilerInstance() override;
0214
0215
0216
0217
0218
0219
0220
0221
0222
0223
0224
0225
0226
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245 bool ExecuteAction(FrontendAction &Act);
0246
0247
0248 void printDiagnosticStats();
0249
0250
0251 void LoadRequestedPlugins();
0252
0253
0254
0255
0256
0257 bool hasInvocation() const { return Invocation != nullptr; }
0258
0259 CompilerInvocation &getInvocation() {
0260 assert(Invocation && "Compiler instance has no invocation!");
0261 return *Invocation;
0262 }
0263
0264 std::shared_ptr<CompilerInvocation> getInvocationPtr() { return Invocation; }
0265
0266
0267 void setInvocation(std::shared_ptr<CompilerInvocation> Value);
0268
0269
0270 bool shouldBuildGlobalModuleIndex() const;
0271
0272
0273
0274 void setBuildGlobalModuleIndex(bool Build) {
0275 BuildGlobalModuleIndex = Build;
0276 }
0277
0278
0279
0280
0281
0282 AnalyzerOptions &getAnalyzerOpts() { return Invocation->getAnalyzerOpts(); }
0283
0284 CodeGenOptions &getCodeGenOpts() {
0285 return Invocation->getCodeGenOpts();
0286 }
0287 const CodeGenOptions &getCodeGenOpts() const {
0288 return Invocation->getCodeGenOpts();
0289 }
0290
0291 DependencyOutputOptions &getDependencyOutputOpts() {
0292 return Invocation->getDependencyOutputOpts();
0293 }
0294 const DependencyOutputOptions &getDependencyOutputOpts() const {
0295 return Invocation->getDependencyOutputOpts();
0296 }
0297
0298 DiagnosticOptions &getDiagnosticOpts() {
0299 return Invocation->getDiagnosticOpts();
0300 }
0301 const DiagnosticOptions &getDiagnosticOpts() const {
0302 return Invocation->getDiagnosticOpts();
0303 }
0304
0305 FileSystemOptions &getFileSystemOpts() {
0306 return Invocation->getFileSystemOpts();
0307 }
0308 const FileSystemOptions &getFileSystemOpts() const {
0309 return Invocation->getFileSystemOpts();
0310 }
0311
0312 FrontendOptions &getFrontendOpts() {
0313 return Invocation->getFrontendOpts();
0314 }
0315 const FrontendOptions &getFrontendOpts() const {
0316 return Invocation->getFrontendOpts();
0317 }
0318
0319 HeaderSearchOptions &getHeaderSearchOpts() {
0320 return Invocation->getHeaderSearchOpts();
0321 }
0322 const HeaderSearchOptions &getHeaderSearchOpts() const {
0323 return Invocation->getHeaderSearchOpts();
0324 }
0325 std::shared_ptr<HeaderSearchOptions> getHeaderSearchOptsPtr() const {
0326 return Invocation->getHeaderSearchOptsPtr();
0327 }
0328
0329 APINotesOptions &getAPINotesOpts() { return Invocation->getAPINotesOpts(); }
0330 const APINotesOptions &getAPINotesOpts() const {
0331 return Invocation->getAPINotesOpts();
0332 }
0333
0334 LangOptions &getLangOpts() { return Invocation->getLangOpts(); }
0335 const LangOptions &getLangOpts() const { return Invocation->getLangOpts(); }
0336 std::shared_ptr<LangOptions> getLangOptsPtr() const {
0337 return Invocation->getLangOptsPtr();
0338 }
0339
0340 PreprocessorOptions &getPreprocessorOpts() {
0341 return Invocation->getPreprocessorOpts();
0342 }
0343 const PreprocessorOptions &getPreprocessorOpts() const {
0344 return Invocation->getPreprocessorOpts();
0345 }
0346
0347 PreprocessorOutputOptions &getPreprocessorOutputOpts() {
0348 return Invocation->getPreprocessorOutputOpts();
0349 }
0350 const PreprocessorOutputOptions &getPreprocessorOutputOpts() const {
0351 return Invocation->getPreprocessorOutputOpts();
0352 }
0353
0354 TargetOptions &getTargetOpts() {
0355 return Invocation->getTargetOpts();
0356 }
0357 const TargetOptions &getTargetOpts() const {
0358 return Invocation->getTargetOpts();
0359 }
0360
0361
0362
0363
0364
0365 bool hasDiagnostics() const { return Diagnostics != nullptr; }
0366
0367
0368 DiagnosticsEngine &getDiagnostics() const {
0369 assert(Diagnostics && "Compiler instance has no diagnostics!");
0370 return *Diagnostics;
0371 }
0372
0373 IntrusiveRefCntPtr<DiagnosticsEngine> getDiagnosticsPtr() const {
0374 assert(Diagnostics && "Compiler instance has no diagnostics!");
0375 return Diagnostics;
0376 }
0377
0378
0379 void setDiagnostics(DiagnosticsEngine *Value);
0380
0381 DiagnosticConsumer &getDiagnosticClient() const {
0382 assert(Diagnostics && Diagnostics->getClient() &&
0383 "Compiler instance has no diagnostic client!");
0384 return *Diagnostics->getClient();
0385 }
0386
0387
0388
0389
0390
0391
0392 void setVerboseOutputStream(raw_ostream &Value);
0393
0394
0395 void setVerboseOutputStream(std::unique_ptr<raw_ostream> Value);
0396
0397
0398 raw_ostream &getVerboseOutputStream() {
0399 return *VerboseOutputStream;
0400 }
0401
0402
0403
0404
0405
0406 bool hasTarget() const { return Target != nullptr; }
0407
0408 TargetInfo &getTarget() const {
0409 assert(Target && "Compiler instance has no target!");
0410 return *Target;
0411 }
0412
0413 IntrusiveRefCntPtr<TargetInfo> getTargetPtr() const {
0414 assert(Target && "Compiler instance has no target!");
0415 return Target;
0416 }
0417
0418
0419 void setTarget(TargetInfo *Value);
0420
0421
0422
0423
0424
0425 TargetInfo *getAuxTarget() const { return AuxTarget.get(); }
0426
0427
0428 void setAuxTarget(TargetInfo *Value);
0429
0430
0431 bool createTarget();
0432
0433
0434
0435
0436
0437 llvm::vfs::FileSystem &getVirtualFileSystem() const;
0438
0439
0440
0441
0442
0443 bool hasFileManager() const { return FileMgr != nullptr; }
0444
0445
0446 FileManager &getFileManager() const {
0447 assert(FileMgr && "Compiler instance has no file manager!");
0448 return *FileMgr;
0449 }
0450
0451 IntrusiveRefCntPtr<FileManager> getFileManagerPtr() const {
0452 assert(FileMgr && "Compiler instance has no file manager!");
0453 return FileMgr;
0454 }
0455
0456 void resetAndLeakFileManager() {
0457 llvm::BuryPointer(FileMgr.get());
0458 FileMgr.resetWithoutRelease();
0459 }
0460
0461
0462 void setFileManager(FileManager *Value);
0463
0464
0465
0466
0467
0468 bool hasSourceManager() const { return SourceMgr != nullptr; }
0469
0470
0471 SourceManager &getSourceManager() const {
0472 assert(SourceMgr && "Compiler instance has no source manager!");
0473 return *SourceMgr;
0474 }
0475
0476 IntrusiveRefCntPtr<SourceManager> getSourceManagerPtr() const {
0477 assert(SourceMgr && "Compiler instance has no source manager!");
0478 return SourceMgr;
0479 }
0480
0481 void resetAndLeakSourceManager() {
0482 llvm::BuryPointer(SourceMgr.get());
0483 SourceMgr.resetWithoutRelease();
0484 }
0485
0486
0487 void setSourceManager(SourceManager *Value);
0488
0489
0490
0491
0492
0493 bool hasPreprocessor() const { return PP != nullptr; }
0494
0495
0496 Preprocessor &getPreprocessor() const {
0497 assert(PP && "Compiler instance has no preprocessor!");
0498 return *PP;
0499 }
0500
0501 std::shared_ptr<Preprocessor> getPreprocessorPtr() { return PP; }
0502
0503 void resetAndLeakPreprocessor() {
0504 llvm::BuryPointer(new std::shared_ptr<Preprocessor>(PP));
0505 }
0506
0507
0508 void setPreprocessor(std::shared_ptr<Preprocessor> Value);
0509
0510
0511
0512
0513
0514 bool hasASTContext() const { return Context != nullptr; }
0515
0516 ASTContext &getASTContext() const {
0517 assert(Context && "Compiler instance has no AST context!");
0518 return *Context;
0519 }
0520
0521 IntrusiveRefCntPtr<ASTContext> getASTContextPtr() const {
0522 assert(Context && "Compiler instance has no AST context!");
0523 return Context;
0524 }
0525
0526 void resetAndLeakASTContext() {
0527 llvm::BuryPointer(Context.get());
0528 Context.resetWithoutRelease();
0529 }
0530
0531
0532 void setASTContext(ASTContext *Value);
0533
0534
0535
0536 void setSema(Sema *S);
0537
0538
0539
0540
0541
0542 bool hasASTConsumer() const { return (bool)Consumer; }
0543
0544 ASTConsumer &getASTConsumer() const {
0545 assert(Consumer && "Compiler instance has no AST consumer!");
0546 return *Consumer;
0547 }
0548
0549
0550
0551 std::unique_ptr<ASTConsumer> takeASTConsumer() { return std::move(Consumer); }
0552
0553
0554
0555 void setASTConsumer(std::unique_ptr<ASTConsumer> Value);
0556
0557
0558
0559
0560 bool hasSema() const { return (bool)TheSema; }
0561
0562 Sema &getSema() const {
0563 assert(TheSema && "Compiler instance has no Sema object!");
0564 return *TheSema;
0565 }
0566
0567 std::unique_ptr<Sema> takeSema();
0568 void resetAndLeakSema();
0569
0570
0571
0572
0573
0574 IntrusiveRefCntPtr<ASTReader> getASTReader() const;
0575 void setASTReader(IntrusiveRefCntPtr<ASTReader> Reader);
0576
0577 std::shared_ptr<ModuleDependencyCollector> getModuleDepCollector() const;
0578 void setModuleDepCollector(
0579 std::shared_ptr<ModuleDependencyCollector> Collector);
0580
0581 std::shared_ptr<PCHContainerOperations> getPCHContainerOperations() const {
0582 return ThePCHContainerOperations;
0583 }
0584
0585
0586
0587 const PCHContainerWriter &getPCHContainerWriter() const {
0588 assert(Invocation && "cannot determine module format without invocation");
0589 StringRef Format = getHeaderSearchOpts().ModuleFormat;
0590 auto *Writer = ThePCHContainerOperations->getWriterOrNull(Format);
0591 if (!Writer) {
0592 if (Diagnostics)
0593 Diagnostics->Report(diag::err_module_format_unhandled) << Format;
0594 llvm::report_fatal_error("unknown module format");
0595 }
0596 return *Writer;
0597 }
0598
0599
0600
0601 const PCHContainerReader &getPCHContainerReader() const {
0602 assert(Invocation && "cannot determine module format without invocation");
0603 StringRef Format = getHeaderSearchOpts().ModuleFormat;
0604 auto *Reader = ThePCHContainerOperations->getReaderOrNull(Format);
0605 if (!Reader) {
0606 if (Diagnostics)
0607 Diagnostics->Report(diag::err_module_format_unhandled) << Format;
0608 llvm::report_fatal_error("unknown module format");
0609 }
0610 return *Reader;
0611 }
0612
0613
0614
0615
0616
0617 bool hasCodeCompletionConsumer() const { return (bool)CompletionConsumer; }
0618
0619 CodeCompleteConsumer &getCodeCompletionConsumer() const {
0620 assert(CompletionConsumer &&
0621 "Compiler instance has no code completion consumer!");
0622 return *CompletionConsumer;
0623 }
0624
0625
0626
0627 void setCodeCompletionConsumer(CodeCompleteConsumer *Value);
0628
0629
0630
0631
0632
0633 llvm::TimerGroup &getTimerGroup() const { return *timerGroup; }
0634
0635 llvm::Timer &getFrontendTimer() const {
0636 assert(FrontendTimer && "Compiler instance has no frontend timer!");
0637 return *FrontendTimer;
0638 }
0639
0640
0641
0642
0643
0644 bool hasFailedModulesSet() const { return (bool)FailedModules; }
0645
0646 void createFailedModulesSet() {
0647 FailedModules = std::make_shared<FailedModulesSet>();
0648 }
0649
0650 std::shared_ptr<FailedModulesSet> getFailedModulesSetPtr() const {
0651 return FailedModules;
0652 }
0653
0654 void setFailedModulesSet(std::shared_ptr<FailedModulesSet> FMS) {
0655 FailedModules = FMS;
0656 }
0657
0658
0659
0660
0661
0662
0663
0664
0665
0666 void clearOutputFiles(bool EraseFiles);
0667
0668
0669
0670
0671
0672
0673
0674
0675
0676
0677
0678
0679
0680
0681
0682
0683
0684
0685
0686
0687 void createDiagnostics(llvm::vfs::FileSystem &VFS,
0688 DiagnosticConsumer *Client = nullptr,
0689 bool ShouldOwnClient = true);
0690
0691
0692
0693
0694
0695
0696
0697
0698
0699
0700
0701
0702
0703
0704
0705
0706
0707
0708
0709 static IntrusiveRefCntPtr<DiagnosticsEngine>
0710 createDiagnostics(llvm::vfs::FileSystem &VFS, DiagnosticOptions *Opts,
0711 DiagnosticConsumer *Client = nullptr,
0712 bool ShouldOwnClient = true,
0713 const CodeGenOptions *CodeGenOpts = nullptr);
0714
0715
0716
0717
0718 FileManager *
0719 createFileManager(IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS = nullptr);
0720
0721
0722 void createSourceManager(FileManager &FileMgr);
0723
0724
0725
0726 void createPreprocessor(TranslationUnitKind TUKind);
0727
0728 std::string getSpecificModuleCachePath(StringRef ModuleHash);
0729 std::string getSpecificModuleCachePath() {
0730 return getSpecificModuleCachePath(getInvocation().getModuleHash());
0731 }
0732
0733
0734 void createASTContext();
0735
0736
0737
0738 void createPCHExternalASTSource(
0739 StringRef Path, DisableValidationForModuleKind DisableValidation,
0740 bool AllowPCHWithCompilerErrors, void *DeserializationListener,
0741 bool OwnDeserializationListener);
0742
0743
0744
0745
0746 static IntrusiveRefCntPtr<ASTReader> createPCHExternalASTSource(
0747 StringRef Path, StringRef Sysroot,
0748 DisableValidationForModuleKind DisableValidation,
0749 bool AllowPCHWithCompilerErrors, Preprocessor &PP,
0750 InMemoryModuleCache &ModuleCache, ASTContext &Context,
0751 const PCHContainerReader &PCHContainerRdr,
0752 ArrayRef<std::shared_ptr<ModuleFileExtension>> Extensions,
0753 ArrayRef<std::shared_ptr<DependencyCollector>> DependencyCollectors,
0754 void *DeserializationListener, bool OwnDeserializationListener,
0755 bool Preamble, bool UseGlobalModuleIndex);
0756
0757
0758
0759
0760 void createCodeCompletionConsumer();
0761
0762
0763
0764 static CodeCompleteConsumer *createCodeCompletionConsumer(
0765 Preprocessor &PP, StringRef Filename, unsigned Line, unsigned Column,
0766 const CodeCompleteOptions &Opts, raw_ostream &OS);
0767
0768
0769 void createSema(TranslationUnitKind TUKind,
0770 CodeCompleteConsumer *CompletionConsumer);
0771
0772
0773 void createFrontendTimer();
0774
0775
0776
0777
0778
0779
0780
0781
0782
0783
0784 std::unique_ptr<raw_pwrite_stream> createDefaultOutputFile(
0785 bool Binary = true, StringRef BaseInput = "", StringRef Extension = "",
0786 bool RemoveFileOnSignal = true, bool CreateMissingDirectories = false,
0787 bool ForceUseTemporary = false);
0788
0789
0790
0791
0792
0793 std::unique_ptr<raw_pwrite_stream>
0794 createOutputFile(StringRef OutputPath, bool Binary, bool RemoveFileOnSignal,
0795 bool UseTemporary, bool CreateMissingDirectories = false);
0796
0797 private:
0798
0799
0800
0801
0802
0803
0804
0805
0806
0807
0808
0809
0810
0811
0812
0813
0814
0815 Expected<std::unique_ptr<raw_pwrite_stream>>
0816 createOutputFileImpl(StringRef OutputPath, bool Binary,
0817 bool RemoveFileOnSignal, bool UseTemporary,
0818 bool CreateMissingDirectories);
0819
0820 public:
0821 std::unique_ptr<raw_pwrite_stream> createNullOutputFile();
0822
0823
0824
0825
0826
0827
0828
0829
0830
0831 bool InitializeSourceManager(const FrontendInputFile &Input);
0832
0833
0834
0835
0836
0837 static bool InitializeSourceManager(const FrontendInputFile &Input,
0838 DiagnosticsEngine &Diags,
0839 FileManager &FileMgr,
0840 SourceManager &SourceMgr);
0841
0842
0843
0844 void setOutputStream(std::unique_ptr<llvm::raw_pwrite_stream> OutStream) {
0845 OutputStream = std::move(OutStream);
0846 }
0847
0848 std::unique_ptr<llvm::raw_pwrite_stream> takeOutputStream() {
0849 return std::move(OutputStream);
0850 }
0851
0852 void createASTReader();
0853
0854 bool loadModuleFile(StringRef FileName,
0855 serialization::ModuleFile *&LoadedModuleFile);
0856
0857 private:
0858
0859
0860
0861
0862
0863
0864
0865
0866
0867
0868
0869 ModuleLoadResult findOrCompileModuleAndReadAST(StringRef ModuleName,
0870 SourceLocation ImportLoc,
0871 SourceLocation ModuleNameLoc,
0872 bool IsInclusionDirective);
0873
0874 public:
0875 ModuleLoadResult loadModule(SourceLocation ImportLoc, ModuleIdPath Path,
0876 Module::NameVisibilityKind Visibility,
0877 bool IsInclusionDirective) override;
0878
0879 void createModuleFromSource(SourceLocation ImportLoc, StringRef ModuleName,
0880 StringRef Source) override;
0881
0882 void makeModuleVisible(Module *Mod, Module::NameVisibilityKind Visibility,
0883 SourceLocation ImportLoc) override;
0884
0885 bool hadModuleLoaderFatalFailure() const {
0886 return ModuleLoader::HadFatalFailure;
0887 }
0888
0889 GlobalModuleIndex *loadGlobalModuleIndex(SourceLocation TriggerLoc) override;
0890
0891 bool lookupMissingImports(StringRef Name, SourceLocation TriggerLoc) override;
0892
0893 void addDependencyCollector(std::shared_ptr<DependencyCollector> Listener) {
0894 DependencyCollectors.push_back(std::move(Listener));
0895 }
0896
0897 void setExternalSemaSource(IntrusiveRefCntPtr<ExternalSemaSource> ESS);
0898
0899 InMemoryModuleCache &getModuleCache() const { return *ModuleCache; }
0900 };
0901
0902 }
0903
0904 #endif