From: Chris Lattner Date: Tue, 1 Aug 2006 18:12:29 +0000 (+0000) Subject: No need to check isWriteable here (which isn't sufficient anyway). Just attempt X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=33b0e9c644838667262f40199b94b20a3524ae4a;p=oota-llvm.git No need to check isWriteable here (which isn't sufficient anyway). Just attempt to do the operation and if it fails, oh well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29446 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvmc/CompilerDriver.cpp b/tools/llvmc/CompilerDriver.cpp index c1c9b982c2b..82dc547ba39 100644 --- a/tools/llvmc/CompilerDriver.cpp +++ b/tools/llvmc/CompilerDriver.cpp @@ -187,7 +187,8 @@ private: void cleanup() { if (!isSet(KEEP_TEMPS_FLAG)) { - if (TempDir.isDirectory() && TempDir.canWrite()) + sys::FileStatus Status; + if (!TempDir.getFileStatus(Status) && Status.isDir) TempDir.eraseFromDisk(/*remove_contents=*/true); } else { std::cout << "Temporary files are in " << TempDir << "\n";