mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:39:47 +00:00
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
This commit is contained in:
parent
0fc66f4b8f
commit
6f750292da
@ -122,8 +122,8 @@ int llvm::libDriverMain(llvm::ArrayRef<const char*> ArgsArr) {
|
|||||||
llvm::errs() << "ignoring unknown argument: " << Arg->getSpelling() << "\n";
|
llvm::errs() << "ignoring unknown argument: " << Arg->getSpelling() << "\n";
|
||||||
|
|
||||||
if (Args.filtered_begin(OPT_INPUT) == Args.filtered_end()) {
|
if (Args.filtered_begin(OPT_INPUT) == Args.filtered_end()) {
|
||||||
llvm::errs() << "no input files.\n";
|
// No input files. To match lib.exe, silently do nothing.
|
||||||
return 1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<StringRef> SearchPaths = getSearchPaths(&Args, Saver);
|
std::vector<StringRef> SearchPaths = getSearchPaths(&Args, Saver);
|
||||||
|
2
test/LibDriver/no-inputs.test
Normal file
2
test/LibDriver/no-inputs.test
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
RUN: llvm-lib -out:%t.a
|
||||||
|
RUN: test ! -e %t.a
|
Loading…
Reference in New Issue
Block a user