diff options
Diffstat (limited to 'include/clang/Frontend/PathDiagnosticClients.h')
| -rw-r--r-- | include/clang/Frontend/PathDiagnosticClients.h | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/include/clang/Frontend/PathDiagnosticClients.h b/include/clang/Frontend/PathDiagnosticClients.h index 028cd8549272d..8cb6898d75984 100644 --- a/include/clang/Frontend/PathDiagnosticClients.h +++ b/include/clang/Frontend/PathDiagnosticClients.h @@ -14,7 +14,9 @@ #ifndef LLVM_CLANG_FRONTEND_PATH_DIAGNOSTIC_CLIENTS_H #define LLVM_CLANG_FRONTEND_PATH_DIAGNOSTIC_CLiENTS_H +#include <memory> #include <string> +#include "llvm/ADT/SmallVector.h" namespace clang { @@ -22,13 +24,31 @@ class PathDiagnosticClient; class Preprocessor; class PreprocessorFactory; -PathDiagnosticClient* CreateHTMLDiagnosticClient(const std::string& prefix, - Preprocessor* PP = 0, - PreprocessorFactory* PPF = 0); - -PathDiagnosticClient* CreatePlistDiagnosticClient(const std::string& prefix, - Preprocessor* PP, - PreprocessorFactory* PPF); -} +class PathDiagnosticClientFactory { +public: + PathDiagnosticClientFactory() {} + virtual ~PathDiagnosticClientFactory() {} + virtual const char *getName() const = 0; + + virtual PathDiagnosticClient* + createPathDiagnosticClient(llvm::SmallVectorImpl<std::string> *FilesMade) = 0; +}; + +PathDiagnosticClient* +CreateHTMLDiagnosticClient(const std::string& prefix, Preprocessor* PP = 0, + PreprocessorFactory* PPF = 0, + llvm::SmallVectorImpl<std::string>* FilesMade = 0); + +PathDiagnosticClientFactory* +CreateHTMLDiagnosticClientFactory(const std::string& prefix, + Preprocessor* PP = 0, + PreprocessorFactory* PPF = 0); + +PathDiagnosticClient* +CreatePlistDiagnosticClient(const std::string& prefix, Preprocessor* PP, + PreprocessorFactory* PPF, + PathDiagnosticClientFactory *PF = 0); + +} // end clang namespace #endif |
