diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-01-31 22:00:42 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-01-31 22:00:42 +0000 |
commit | ff9cd968cd5b623e3ec7e5f862b598cd22f7ec79 (patch) | |
tree | c50fc2d628d72ea2c4c87d1b9dce38eadf4fcba0 /include/clang/Frontend/CompilerInstance.h | |
parent | 94659e4bdb87534f591ae185812548c42d6efacb (diff) |
Frontend: Add an explicit RemoveFileOnSignal flag argument, to control the
automatic behavior (which is undesirable in a multithreaded context).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124612 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CompilerInstance.h')
-rw-r--r-- | include/clang/Frontend/CompilerInstance.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index 67d6dd81fe..fd6224bd3c 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -583,7 +583,8 @@ public: /// /// \return - Null on error. llvm::raw_fd_ostream * - createOutputFile(llvm::StringRef OutputPath, bool Binary = true, + createOutputFile(llvm::StringRef OutputPath, + bool Binary = true, bool RemoveFileOnSignal = true, llvm::StringRef BaseInput = "", llvm::StringRef Extension = ""); @@ -600,13 +601,17 @@ public: /// for deriving the output path. /// \param Extension - The extension to use for derived output names. /// \param Binary - The mode to open the file in. + /// \param RemoveFileOnSignal - Whether the file should be registered with + /// llvm::sys::RemoveFileOnSignal. Note that this is not safe for + /// multithreaded use, as the underlying signal mechanism is not reentrant /// \param ResultPathName [out] - If given, the result path name will be /// stored here on success. /// \param TempPathName [out] - If given, the temporary file path name /// will be stored here on success. static llvm::raw_fd_ostream * createOutputFile(llvm::StringRef OutputPath, std::string &Error, - bool Binary = true, llvm::StringRef BaseInput = "", + bool Binary = true, bool RemoveFileOnSignal = true, + llvm::StringRef BaseInput = "", llvm::StringRef Extension = "", std::string *ResultPathName = 0, std::string *TempPathName = 0); |