From 63b8c1f6f118dfef44422283947bdc3388c0fcb4 Mon Sep 17 00:00:00 2001 From: Andrew Lenharth Date: Thu, 28 Feb 2008 22:24:48 +0000 Subject: 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 --- tools/llvm-ar/llvm-ar.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tools') 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); -- cgit v1.2.3