summaryrefslogtreecommitdiffstats
path: root/clang/include/clang/Frontend/CompilerInstance.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include/clang/Frontend/CompilerInstance.h')
-rw-r--r--clang/include/clang/Frontend/CompilerInstance.h34
1 files changed, 14 insertions, 20 deletions
diff --git a/clang/include/clang/Frontend/CompilerInstance.h b/clang/include/clang/Frontend/CompilerInstance.h
index cf66088aae2..1228cf4d5fc 100644
--- a/clang/include/clang/Frontend/CompilerInstance.h
+++ b/clang/include/clang/Frontend/CompilerInstance.h
@@ -155,15 +155,10 @@ class CompilerInstance : public ModuleLoader {
struct OutputFile {
std::string Filename;
std::string TempFilename;
- std::unique_ptr<raw_ostream> OS;
-
- OutputFile(std::string filename, std::string tempFilename,
- std::unique_ptr<raw_ostream> OS)
- : Filename(std::move(filename)), TempFilename(std::move(tempFilename)),
- OS(std::move(OS)) {}
- OutputFile(OutputFile &&O)
- : Filename(std::move(O.Filename)),
- TempFilename(std::move(O.TempFilename)), OS(std::move(O.OS)) {}
+
+ OutputFile(std::string filename, std::string tempFilename)
+ : Filename(std::move(filename)), TempFilename(std::move(tempFilename)) {
+ }
};
/// If the output doesn't support seeking (terminal, pipe). we switch
@@ -577,8 +572,8 @@ public:
/// \param OutFile - The output file info.
void addOutputFile(OutputFile &&OutFile);
- /// clearOutputFiles - Clear the output file list, destroying the contained
- /// output streams.
+ /// clearOutputFiles - Clear the output file list. The underlying output
+ /// streams must have been closed beforehand.
///
/// \param EraseFiles - If true, attempt to erase the files from disk.
void clearOutputFiles(bool EraseFiles);
@@ -685,19 +680,18 @@ public:
/// atomically replace the target output on success).
///
/// \return - Null on error.
- raw_pwrite_stream *createDefaultOutputFile(bool Binary = true,
- StringRef BaseInput = "",
- StringRef Extension = "");
+ std::unique_ptr<raw_pwrite_stream>
+ createDefaultOutputFile(bool Binary = true, StringRef BaseInput = "",
+ StringRef Extension = "");
/// Create a new output file and add it to the list of tracked output files,
/// optionally deriving the output path name.
///
/// \return - Null on error.
- raw_pwrite_stream *createOutputFile(StringRef OutputPath, bool Binary,
- bool RemoveFileOnSignal,
- StringRef BaseInput, StringRef Extension,
- bool UseTemporary,
- bool CreateMissingDirectories = false);
+ std::unique_ptr<raw_pwrite_stream>
+ createOutputFile(StringRef OutputPath, bool Binary, bool RemoveFileOnSignal,
+ StringRef BaseInput, StringRef Extension, bool UseTemporary,
+ bool CreateMissingDirectories = false);
/// Create a new output file, optionally deriving the output path name.
///
@@ -731,7 +725,7 @@ public:
bool CreateMissingDirectories, std::string *ResultPathName,
std::string *TempPathName);
- llvm::raw_null_ostream *createNullOutputFile();
+ std::unique_ptr<raw_pwrite_stream> createNullOutputFile();
/// }
/// @name Initialization Utility Methods
OpenPOWER on IntegriCloud