Fix return after llvm_unreachable

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192414 91177308-0d34-0410-b5e6-96231b3b80d8
Use switch instead of if, and handle all enum values.

This patch also handles errors other than no_more_files error. They were silently
ignored.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192415 91177308-0d34-0410-b5e6-96231b3b80d8
Remove an unused variable added in r192415.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192416 91177308-0d34-0410-b5e6-96231b3b80d8
Replace a recursive tail call with an infinite loop.

This eliminates _elements's size check from the loop.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192418 91177308-0d34-0410-b5e6-96231b3b80d8
Return true from Resolver::resolve() on success.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192422 91177308-0d34-0410-b5e6-96231b3b80d8
Remove excessive allowRemainingUndefines() check.

allowRemainingUndefines() is already checked in Resolver::resolve(), so we
don't need to check it again after returning from it. It's actually not only
superfluous but buggy because a failure of resolve() does not always mean that
there is a remaining undefines.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192423 91177308-0d34-0410-b5e6-96231b3b80d8
Propagate Resolver::resolveUndefines()'s failure to caller.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192424 91177308-0d34-0410-b5e6-96231b3b80d8