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
This commit is contained in:
Andrew Lenharth
2008-02-28 22:24:48 +00:00
parent f3c630e3fc
commit 63b8c1f6f1
2 changed files with 2 additions and 1 deletions

View File

@@ -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);