aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-ar/llvm-ar.cpp
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2008-02-28 22:24:48 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2008-02-28 22:24:48 +0000
commit63b8c1f6f118dfef44422283947bdc3388c0fcb4 (patch)
tree4bd44e33d6c8f9b572ffcc13ea78758c9caf82a4 /tools/llvm-ar/llvm-ar.cpp
parentf3c630e3fc2cec564325ae43c90f94b0c4a1662d (diff)
Make llvm-ar behave like ar, if you create an empty archive, ar creates an empty archive. llvm-ar would not generate an output file in this case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47733 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-ar/llvm-ar.cpp')
-rw-r--r--tools/llvm-ar/llvm-ar.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp
index a72a4c0019..a6611a3e80 100644
--- a/tools/llvm-ar/llvm-ar.cpp
+++ b/tools/llvm-ar/llvm-ar.cpp
@@ -717,6 +717,7 @@ int main(int argc, char **argv) {
if (!Create)
std::cerr << argv[0] << ": creating " << ArchivePath.toString() << "\n";
TheArchive = Archive::CreateEmpty(ArchivePath);
+ TheArchive->writeToDisk();
} else {
std::string Error;
TheArchive = Archive::OpenAndLoad(ArchivePath, &Error);