summaryrefslogtreecommitdiff
path: root/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
commit95779b65cf7b7d7c22bf2d22d03c661c8130cbe2 (patch)
treee0862520042c2d69ac771d906150b27bf122773e /test/Object
parent21508bf853354343266dbe6d830ff30bed006a68 (diff)
downloadllvm-95779b65cf7b7d7c22bf2d22d03c661c8130cbe2.tar.gz
llvm-95779b65cf7b7d7c22bf2d22d03c661c8130cbe2.tar.bz2
llvm-95779b65cf7b7d7c22bf2d22d03c661c8130cbe2.tar.xz
On error, close the temporary file descriptor.
With this change llvm-ar can remove the temporary file on windows too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186423 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Object')
-rw-r--r--test/Object/archive-error-tmp.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Object/archive-error-tmp.txt b/test/Object/archive-error-tmp.txt
new file mode 100644
index 0000000000..061898655b
--- /dev/null
+++ b/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
+