Return true from Resolver::resolve() on success.

llvm-svn: 192422
This commit is contained in:
Rui Ueyama 2013-10-11 06:16:33 +00:00
parent d5d16d57eb
commit ee366042e9
2 changed files with 3 additions and 3 deletions

View File

@ -475,12 +475,12 @@ bool Resolver::resolve() {
this->deadStripOptimize();
if (this->checkUndefines(false)) {
if (!_context.allowRemainingUndefines())
return true;
return false;
}
this->removeCoalescedAwayAtoms();
this->linkTimeOptimize();
this->_result.addAtoms(_atoms);
return false;
return true;
}
void Resolver::MergedFile::addAtom(const Atom& atom) {

View File

@ -107,7 +107,7 @@ bool Driver::link(LinkingContext &context, raw_ostream &diagnostics) {
// Do core linking.
ScopedTask resolveTask(getDefaultDomain(), "Resolve");
Resolver resolver(context);
if (resolver.resolve()) {
if (!resolver.resolve()) {
if (!context.allowRemainingUndefines())
return false;
}