From 5413f6f863540b45bed61e577bf5c2cc85ae08a4 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Wed, 13 Apr 2016 19:36:04 +0000 Subject: LibDriver: Silently do nothing when provided no inputs. This behavior is strange, but it matches lib.exe. Based on a patch by Nico Weber. Fixes PR27335. llvm-svn: 266236 --- llvm/lib/LibDriver/LibDriver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/LibDriver/LibDriver.cpp') diff --git a/llvm/lib/LibDriver/LibDriver.cpp b/llvm/lib/LibDriver/LibDriver.cpp index 3ae54346074..671cc73c576 100644 --- a/llvm/lib/LibDriver/LibDriver.cpp +++ b/llvm/lib/LibDriver/LibDriver.cpp @@ -122,8 +122,8 @@ int llvm::libDriverMain(llvm::ArrayRef ArgsArr) { llvm::errs() << "ignoring unknown argument: " << Arg->getSpelling() << "\n"; if (Args.filtered_begin(OPT_INPUT) == Args.filtered_end()) { - llvm::errs() << "no input files.\n"; - return 1; + // No input files. To match lib.exe, silently do nothing. + return 0; } std::vector SearchPaths = getSearchPaths(&Args, Saver); -- cgit v1.2.3