summaryrefslogtreecommitdiff
path: root/include/clang/Driver/Compilation.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Driver/Compilation.h')
-rw-r--r--include/clang/Driver/Compilation.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/clang/Driver/Compilation.h b/include/clang/Driver/Compilation.h
index 036b04605ac7..89c0def6c57a 100644
--- a/include/clang/Driver/Compilation.h
+++ b/include/clang/Driver/Compilation.h
@@ -99,8 +99,8 @@ class Compilation {
/// only be removed if we crash.
ArgStringMap FailureResultFiles;
- /// Redirection for stdout, stderr, etc.
- const StringRef **Redirects;
+ /// Optional redirection for stdin, stdout, stderr.
+ std::vector<Optional<StringRef>> Redirects;
/// Whether we're compiling for diagnostic purposes.
bool ForDiagnostics;
@@ -283,12 +283,10 @@ public:
/// Redirect - Redirect output of this compilation. Can only be done once.
///
- /// \param Redirects - array of pointers to paths. The array
- /// should have a size of three. The inferior process's
- /// stdin(0), stdout(1), and stderr(2) will be redirected to the
- /// corresponding paths. This compilation instance becomes
- /// the owner of Redirects and will delete the array and StringRef's.
- void Redirect(const StringRef** Redirects);
+ /// \param Redirects - array of optional paths. The array should have a size
+ /// of three. The inferior process's stdin(0), stdout(1), and stderr(2) will
+ /// be redirected to the corresponding paths, if provided (not llvm::None).
+ void Redirect(ArrayRef<Optional<StringRef>> Redirects);
};
} // end namespace driver