forked from OSchip/llvm-project
[lld][Driver] The driver was creating linker inputs twice
Also add a llvm_unreachable call so that the linker will trip on unhandled inputElement types. llvm-svn: 189887
This commit is contained in:
parent
5eb7df68bf
commit
3df170b84e
|
@ -60,7 +60,11 @@ bool Driver::link(const LinkingContext &context, raw_ostream &diagnostics) {
|
|||
llvm::outs() << fileNode->errStr(error_code(linkerInput)) << "\n";
|
||||
return true;
|
||||
}
|
||||
linkerInputs.push_back(std::move(*fileNode->createLinkerInput(context)));
|
||||
linkerInputs.push_back(std::move(*linkerInput));
|
||||
}
|
||||
else {
|
||||
llvm_unreachable("Not handling other types of InputElements");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
for (const auto &input : linkerInputs) {
|
||||
|
|
Loading…
Reference in New Issue