diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/FileUtilities.h | 8 | ||||
-rw-r--r-- | include/llvm/System/Path.h | 10 |
2 files changed, 8 insertions, 10 deletions
diff --git a/include/llvm/Support/FileUtilities.h b/include/llvm/Support/FileUtilities.h index 67eb3bb30f..d0d193deb9 100644 --- a/include/llvm/Support/FileUtilities.h +++ b/include/llvm/Support/FileUtilities.h @@ -43,10 +43,10 @@ namespace llvm { : Filename(filename), DeleteIt(deleteIt) {} ~FileRemover() { - if (DeleteIt) - try { - Filename.eraseFromDisk(); - } catch (...) {} // Ignore problems deleting the file. + if (DeleteIt) { + // Ignore problems deleting the file. + Filename.eraseFromDisk(); + } } /// releaseFile - Take ownership of the file away from the FileRemover so it diff --git a/include/llvm/System/Path.h b/include/llvm/System/Path.h index f8ff8f4233..14602d7a2c 100644 --- a/include/llvm/System/Path.h +++ b/include/llvm/System/Path.h @@ -522,17 +522,15 @@ namespace sys { /// \p destroy_contents parameter is ignored. /// @param destroy_contents Indicates whether the contents of a destroyed /// directory should also be destroyed (recursively). - /// @returns true if the file/directory was destroyed, false if the path - /// refers to something that is neither a file nor a directory. - /// @throws std::string if there is an error. + /// @returns false if the file/directory was destroyed, true on error. /// @brief Removes the file or directory from the filesystem. - bool eraseFromDisk(bool destroy_contents = false) const; - + bool eraseFromDisk(bool destroy_contents = false, + std::string *Err = 0) const; /// @} /// @name Data /// @{ private: - mutable std::string path; ///< Storage for the path name. + mutable std::string path; ///< Storage for the path name. /// @} }; |