File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 17
17
18
18
namespace clang {
19
19
class ASTContext ;
20
+ class CompilerInstance ;
20
21
class Preprocessor ;
21
22
class Sema ;
22
23
} // namespace clang
@@ -32,6 +33,7 @@ class ClangModuleLoader : public ModuleLoader {
32
33
virtual clang::ASTContext &getClangASTContext () const = 0;
33
34
virtual clang::Preprocessor &getClangPreprocessor () const = 0;
34
35
virtual clang::Sema &getClangSema () const = 0;
36
+ virtual const clang::CompilerInstance &getClangInstance () const = 0;
35
37
virtual void printStatistics () const = 0;
36
38
37
39
// / Returns the module that contains imports and declarations from all loaded
Original file line number Diff line number Diff line change @@ -241,6 +241,7 @@ class ClangImporter final : public ClangModuleLoader {
241
241
clang::ASTContext &getClangASTContext () const override ;
242
242
clang::Preprocessor &getClangPreprocessor () const override ;
243
243
clang::Sema &getClangSema () const override ;
244
+ const clang::CompilerInstance &getClangInstance () const override ;
244
245
clang::CodeGenOptions &getClangCodeGenOpts () const ;
245
246
246
247
std::string getClangModuleHash () const ;
Original file line number Diff line number Diff line change @@ -2373,6 +2373,11 @@ clang::ASTContext &ClangImporter::getClangASTContext() const {
2373
2373
clang::Preprocessor &ClangImporter::getClangPreprocessor () const {
2374
2374
return Impl.getClangPreprocessor ();
2375
2375
}
2376
+
2377
+ const clang::CompilerInstance &ClangImporter::getClangInstance () const {
2378
+ return *Impl.Instance ;
2379
+ }
2380
+
2376
2381
const clang::Module *ClangImporter::getClangOwningModule (ClangNode Node) const {
2377
2382
return ::getClangOwningModule (Node, getClangASTContext ());
2378
2383
}
You can’t perform that action at this time.
0 commit comments