summaryrefslogtreecommitdiff
path: root/tools/llvmc/CompilerDriver.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-08-01 18:12:29 +0000
committerChris Lattner <sabre@nondot.org>2006-08-01 18:12:29 +0000
commit33b0e9c644838667262f40199b94b20a3524ae4a (patch)
treea7595db66d4e837832ac6a504d039bea1add3223 /tools/llvmc/CompilerDriver.cpp
parent8bdbb04f9b1b79a75677b1ff6217cadc3b660af9 (diff)
downloadllvm-33b0e9c644838667262f40199b94b20a3524ae4a.tar.gz
llvm-33b0e9c644838667262f40199b94b20a3524ae4a.tar.bz2
llvm-33b0e9c644838667262f40199b94b20a3524ae4a.tar.xz
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
Diffstat (limited to 'tools/llvmc/CompilerDriver.cpp')
-rw-r--r--tools/llvmc/CompilerDriver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llvmc/CompilerDriver.cpp b/tools/llvmc/CompilerDriver.cpp
index c1c9b982c2..82dc547ba3 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";