summaryrefslogtreecommitdiffstats
path: root/include/clang/Frontend/TextDiagnosticPrinter.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Frontend/TextDiagnosticPrinter.h')
-rw-r--r--include/clang/Frontend/TextDiagnosticPrinter.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/clang/Frontend/TextDiagnosticPrinter.h b/include/clang/Frontend/TextDiagnosticPrinter.h
index d727e48..d09e51f 100644
--- a/include/clang/Frontend/TextDiagnosticPrinter.h
+++ b/include/clang/Frontend/TextDiagnosticPrinter.h
@@ -37,11 +37,19 @@ class TextDiagnosticPrinter : public DiagnosticClient {
unsigned LastCaretDiagnosticWasNote : 1;
unsigned OwnsOutputStream : 1;
+ /// A string to prefix to error messages.
+ std::string Prefix;
+
public:
TextDiagnosticPrinter(llvm::raw_ostream &os, const DiagnosticOptions &diags,
bool OwnsOutputStream = false);
virtual ~TextDiagnosticPrinter();
+ /// setPrefix - Set the diagnostic printer prefix string, which will be
+ /// printed at the start of any diagnostics. If empty, no prefix string is
+ /// used.
+ void setPrefix(std::string Value) { Prefix = Value; }
+
void BeginSourceFile(const LangOptions &LO, const Preprocessor *PP) {
LangOpts = &LO;
}
OpenPOWER on IntegriCloud