[ORC] Remove query dependencies when symbols are resolved.
If the dependencies are not removed then a late failure (one symbol covered by
the query failing after others have already been resolved) can result in an
attempt to detach the query from already finalized symbol, resulting in an
assert/crash. This patch fixes the issue by removing query dependencies in
JITDylib::resolve for symbols that meet the required state.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369809
91177308-0d34-0410-b5e6-
96231b3b80d8