Change the signatures of the destroyFile and destroyDirectory methods to
const because they affect the file system, not the Path object.
llvm-svn: 18973
diff --git a/llvm/lib/System/Unix/Path.cpp b/llvm/lib/System/Unix/Path.cpp
index 4a18c6b..a78b513 100644
--- a/llvm/lib/System/Unix/Path.cpp
+++ b/llvm/lib/System/Unix/Path.cpp
@@ -492,7 +492,7 @@
}
bool
-Path::destroyDirectory(bool remove_contents) {
+Path::destroyDirectory(bool remove_contents) const {
// Make sure we're dealing with a directory
if (!isDirectory()) return false;
@@ -520,7 +520,7 @@
}
bool
-Path::destroyFile() {
+Path::destroyFile() const {
if (!isFile()) return false;
if (0 != unlink(path.c_str()))
ThrowErrno(path + ": Can't destroy file");