aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/ToolOutputFile.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-01-10 21:40:29 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-01-10 21:40:29 +0000
commit81e7fd011fa0fab28b23c787e2ab66fc1bc9a926 (patch)
tree2a53ca73dcc53598adb93818ec728008e8f0841f /llvm/lib/Support/ToolOutputFile.cpp
parent2a008784d36f492b1fbead7a0f2e7c838ea0befb (diff)
downloadllvm-81e7fd011fa0fab28b23c787e2ab66fc1bc9a926.zip
llvm-81e7fd011fa0fab28b23c787e2ab66fc1bc9a926.tar.gz
llvm-81e7fd011fa0fab28b23c787e2ab66fc1bc9a926.tar.bz2
Use the simpler version of sys::fs::remove when possible.
llvm-svn: 198958
Diffstat (limited to 'llvm/lib/Support/ToolOutputFile.cpp')
-rw-r--r--llvm/lib/Support/ToolOutputFile.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Support/ToolOutputFile.cpp b/llvm/lib/Support/ToolOutputFile.cpp
index 5c1268a..b5fb20f 100644
--- a/llvm/lib/Support/ToolOutputFile.cpp
+++ b/llvm/lib/Support/ToolOutputFile.cpp
@@ -25,10 +25,8 @@ tool_output_file::CleanupInstaller::CleanupInstaller(const char *filename)
tool_output_file::CleanupInstaller::~CleanupInstaller() {
// Delete the file if the client hasn't told us not to.
- if (!Keep && Filename != "-") {
- bool Existed;
- sys::fs::remove(Filename, Existed);
- }
+ if (!Keep && Filename != "-")
+ sys::fs::remove(Filename);
// Ok, the file is successfully written and closed, or deleted. There's no
// further need to clean it up on signals.