summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/include/clang/Lex/Preprocessor.h8
-rw-r--r--clang/lib/Lex/Preprocessor.cpp2
2 files changed, 10 insertions, 0 deletions
diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h
index 98edf5af7a8..5fc4642dd88 100644
--- a/clang/include/clang/Lex/Preprocessor.h
+++ b/clang/include/clang/Lex/Preprocessor.h
@@ -524,6 +524,14 @@ public:
void HandlePragmaDependency(Token &DependencyTok);
};
+/// PreprocessorFactory - A generic factory interface for lazily creating
+/// Preprocessor objects on-demand when they are needed.
+class PreprocessorFactory {
+public:
+ virtual ~PreprocessorFactory();
+ virtual Preprocessor* CreatePreprocessor() = 0;
+};
+
} // end namespace clang
#endif
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index ebd30728660..6d08a36fdef 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -40,6 +40,8 @@ using namespace clang;
//===----------------------------------------------------------------------===//
+PreprocessorFactory::~PreprocessorFactory() {}
+
Preprocessor::Preprocessor(Diagnostic &diags, const LangOptions &opts,
TargetInfo &target, SourceManager &SM,
HeaderSearch &Headers)
OpenPOWER on IntegriCloud