aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-11 09:38:24 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-11 09:38:24 +0000
commitaea364195b81f933515e8968b5254a1195eb0337 (patch)
tree92b0de7cf3a0e2bb7b5f9778d3f22dab1ecd28f7 /include/clang/Frontend
parentead2a5e8e8cad528bc001c01dfe47ca8c5357ff9 (diff)
Allow TextDiagnosticPrinter to have optional ownership of its output stream.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86823 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend')
-rw-r--r--include/clang/Frontend/TextDiagnosticPrinter.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/clang/Frontend/TextDiagnosticPrinter.h b/include/clang/Frontend/TextDiagnosticPrinter.h
index 3c5c6267c6..29a9c305b1 100644
--- a/include/clang/Frontend/TextDiagnosticPrinter.h
+++ b/include/clang/Frontend/TextDiagnosticPrinter.h
@@ -34,10 +34,13 @@ class TextDiagnosticPrinter : public DiagnosticClient {
SourceLocation LastWarningLoc;
FullSourceLoc LastLoc;
- bool LastCaretDiagnosticWasNote;
+ unsigned LastCaretDiagnosticWasNote : 1;
+ unsigned OwnsOutputStream : 1;
public:
- TextDiagnosticPrinter(llvm::raw_ostream &os, const DiagnosticOptions &diags);
+ TextDiagnosticPrinter(llvm::raw_ostream &os, const DiagnosticOptions &diags,
+ bool OwnsOutputStream = false);
+ virtual ~TextDiagnosticPrinter();
void BeginSourceFile(const LangOptions &LO) {
LangOpts = &LO;