Backing out commit r250906 as it broke lld.
[oota-llvm.git] / lib / ExecutionEngine / MCJIT / MCJIT.cpp
index a7238e4ebc338b29fee796913c9af7106405b683..bbe4432d36b318a1a40de7dbd4887d44a1ed58c4 100644 (file)
@@ -318,10 +318,10 @@ RuntimeDyld::SymbolInfo MCJIT::findSymbol(const std::string &Name,
     object::Archive *A = OB.getBinary();
     // Look for our symbols in each Archive
     object::Archive::child_iterator ChildIt = A->findSym(Name);
-    if (*ChildIt && ChildIt != A->child_end()) {
+    if (ChildIt != A->child_end()) {
       // FIXME: Support nested archives?
       ErrorOr<std::unique_ptr<object::Binary>> ChildBinOrErr =
-        (*ChildIt)->getAsBinary();
+          ChildIt->getAsBinary();
       if (ChildBinOrErr.getError())
         continue;
       std::unique_ptr<object::Binary> &ChildBin = ChildBinOrErr.get();