summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-07-16 16:00:32 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-07-16 16:00:32 +0000
commit7303af37b78912c58d3dd14d2b6965898c31ab9b (patch)
tree310e43f36f95a21098c0c59e178989096d03b10c /llvm/test/Object
parent0dbabb52a46d287d2381706c135fce222065c37d (diff)
downloadbcm5719-llvm-7303af37b78912c58d3dd14d2b6965898c31ab9b.tar.gz
bcm5719-llvm-7303af37b78912c58d3dd14d2b6965898c31ab9b.zip
On error, close the temporary file descriptor.
With this change llvm-ar can remove the temporary file on windows too. llvm-svn: 186423
Diffstat (limited to 'llvm/test/Object')
-rw-r--r--llvm/test/Object/archive-error-tmp.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Object/archive-error-tmp.txt b/llvm/test/Object/archive-error-tmp.txt
new file mode 100644
index 00000000000..061898655b6
--- /dev/null
+++ b/llvm/test/Object/archive-error-tmp.txt
@@ -0,0 +1,9 @@
+REQUIRES: shell
+
+Test that no temporary file is left behind on error.
+
+RUN: rm -rf %t
+RUN: mkdir %t
+RUN: not llvm-ar rc %t/foo.a .
+RUN: rmdir %t
+
OpenPOWER on IntegriCloud