summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitec905190bf344f785a11e4911034221b403ed19e (patch)
tree554248a2ef71737774358f294b03099b49cd58f9 /llvm/tools/llvmc/CompilerDriver.cpp
parent63c5e1cf925008e0c8f9a2c2d9634f1e9327892a (diff)
downloadbcm5719-llvm-ec905190bf344f785a11e4911034221b403ed19e.tar.gz
bcm5719-llvm-ec905190bf344f785a11e4911034221b403ed19e.zip
No need to check isWriteable here (which isn't sufficient anyway). Just attempt
to do the operation and if it fails, oh well. llvm-svn: 29446
Diffstat (limited to 'llvm/tools/llvmc/CompilerDriver.cpp')
-rw-r--r--llvm/tools/llvmc/CompilerDriver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvmc/CompilerDriver.cpp b/llvm/tools/llvmc/CompilerDriver.cpp
index c1c9b982c2b..82dc547ba39 100644
--- a/llvm/tools/llvmc/CompilerDriver.cpp
+++ b/llvm/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";
OpenPOWER on IntegriCloud