summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/clang/include/clang/Driver/Compilation.h')
-rw-r--r--contrib/llvm/tools/clang/include/clang/Driver/Compilation.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h b/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h
index 8c99909..fd88c3a 100644
--- a/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h
+++ b/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h
@@ -56,6 +56,10 @@ class Compilation {
/// Result files which should be removed on failure.
ArgStringList ResultFiles;
+ /// Result files which are generated correctly on failure, and which should
+ /// only be removed if we crash.
+ ArgStringList FailureResultFiles;
+
/// Redirection for stdout, stderr, etc.
const llvm::sys::Path **Redirects;
@@ -84,6 +88,10 @@ public:
const ArgStringList &getResultFiles() const { return ResultFiles; }
+ const ArgStringList &getFailureResultFiles() const {
+ return FailureResultFiles;
+ }
+
/// getArgsForToolChain - Return the derived argument list for the
/// tool chain \arg TC (or the default tool chain, if TC is not
/// specified).
@@ -106,6 +114,13 @@ public:
return Name;
}
+ /// addFailureResultFile - Add a file to remove if we crash, and returns its
+ /// argument.
+ const char *addFailureResultFile(const char *Name) {
+ FailureResultFiles.push_back(Name);
+ return Name;
+ }
+
/// CleanupFileList - Remove the files in the given list.
///
/// \param IssueErrors - Report failures as errors.
OpenPOWER on IntegriCloud