diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/FileSystem.h | 7 | ||||
-rw-r--r-- | include/llvm/Support/ToolOutputFile.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Support/FileSystem.h b/include/llvm/Support/FileSystem.h index 9d1d320eff..c1c1fc6ed6 100644 --- a/include/llvm/Support/FileSystem.h +++ b/include/llvm/Support/FileSystem.h @@ -292,6 +292,13 @@ error_code current_path(SmallVectorImpl<char> &result); /// successfully set, otherwise a platform specific error_code. error_code remove(const Twine &path, bool &existed); +/// @brief Convenience function for clients that don't need to know if the file +/// existed or not. +inline error_code remove(const Twine &Path) { + bool Existed; + return remove(Path, Existed); +} + /// @brief Recursively remove all files below \a path, then \a path. Files are /// removed as if by POSIX remove(). /// diff --git a/include/llvm/Support/ToolOutputFile.h b/include/llvm/Support/ToolOutputFile.h index b3b7c577b7..cc8511f55b 100644 --- a/include/llvm/Support/ToolOutputFile.h +++ b/include/llvm/Support/ToolOutputFile.h @@ -49,6 +49,8 @@ public: tool_output_file(const char *filename, std::string &ErrorInfo, unsigned Flags = 0); + tool_output_file(const char *Filename, int FD); + /// os - Return the contained raw_fd_ostream. raw_fd_ostream &os() { return OS; } |