diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-17 18:05:35 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-17 18:05:35 +0000 |
commit | 68c0efac35021516bf46b2793e56e0d9d804c9e8 (patch) | |
tree | 2c6ef13444d2f395b32a4e6b8aeecef992d2d4a6 /include/llvm/Support/FileSystem.h | |
parent | d5bf07b4667c7381fcd375b186e95436b32b90e6 (diff) | |
download | llvm-68c0efac35021516bf46b2793e56e0d9d804c9e8.tar.gz llvm-68c0efac35021516bf46b2793e56e0d9d804c9e8.tar.bz2 llvm-68c0efac35021516bf46b2793e56e0d9d804c9e8.tar.xz |
Don't use PathV1.h in LTOCodeGenerator.cpp
This patch also adds a simpler version of sys::fs::remove and a tool_output_file
constructor for when we already have an open file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184095 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/FileSystem.h')
-rw-r--r-- | include/llvm/Support/FileSystem.h | 7 |
1 files changed, 7 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(). /// |