summaryrefslogtreecommitdiff
path: root/include/clang/Frontend/CompilerInstance.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-10-23 17:52:09 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-10-23 17:52:09 +0000
commit519fc96c475680de2cc49e7811dbbfadb912cbcc (patch)
tree310ca684459b7e9ae13c9a3b9abf308b3a634afe /include/clang/Frontend/CompilerInstance.h
parent2298981669bf3bd63335a4be179bc0f96823a8f4 (diff)
Notes
Diffstat (limited to 'include/clang/Frontend/CompilerInstance.h')
-rw-r--r--include/clang/Frontend/CompilerInstance.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h
index eb49c53ff40b7..d15bdc4665a31 100644
--- a/include/clang/Frontend/CompilerInstance.h
+++ b/include/clang/Frontend/CompilerInstance.h
@@ -155,6 +155,12 @@ class CompilerInstance : public ModuleLoader {
/// One or more modules failed to build.
bool ModuleBuildFailed = false;
+ /// The stream for verbose output if owned, otherwise nullptr.
+ std::unique_ptr<raw_ostream> OwnedVerboseOutputStream;
+
+ /// The stream for verbose output.
+ raw_ostream *VerboseOutputStream = &llvm::errs();
+
/// Holds information about the output file.
///
/// If TempFilename is not empty we must rename it to Filename at the end.
@@ -217,9 +223,6 @@ public:
/// \param Act - The action to execute.
/// \return - True on success.
//
- // FIXME: This function should take the stream to write any debugging /
- // verbose output to as an argument.
- //
// FIXME: Eliminate the llvm_shutdown requirement, that should either be part
// of the context or else not CompilerInstance specific.
bool ExecuteAction(FrontendAction &Act);
@@ -350,6 +353,21 @@ public:
}
/// }
+ /// @name VerboseOutputStream
+ /// }
+
+ /// Replace the current stream for verbose output.
+ void setVerboseOutputStream(raw_ostream &Value);
+
+ /// Replace the current stream for verbose output.
+ void setVerboseOutputStream(std::unique_ptr<raw_ostream> Value);
+
+ /// Get the current stream for verbose output.
+ raw_ostream &getVerboseOutputStream() {
+ return *VerboseOutputStream;
+ }
+
+ /// }
/// @name Target Info
/// {