[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:
Shankar Easwaran 2013-09-03 23:52:05 +00:00
parent 5eb7df68bf
commit 3df170b84e
1 changed files with 5 additions and 1 deletions

View File

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