[flang] Fix static build of flang

An older version of a function (Fortran::semantics::FindFunctionResult) was
left in flang/lib/Semantics/tools.cpp, and this breaks the static library
build due to a conflict with the intended final version in another
file and library.  Remove the old code.

Differential Revision: https://reviews.llvm.org/D98568

GitOrigin-RevId: 59f213c162a43e09bb71bc7a413a1b72c4fddc03
diff --git a/lib/Semantics/tools.cpp b/lib/Semantics/tools.cpp
index 7680d67..2d7fa9d 100644
--- a/lib/Semantics/tools.cpp
+++ b/lib/Semantics/tools.cpp
@@ -434,17 +434,6 @@
       symbol.details());
 }
 
-const Symbol *FindFunctionResult(const Symbol &symbol) {
-  if (const Symbol * subp{FindSubprogram(symbol)}) {
-    if (const auto &subpDetails{subp->detailsIf<SubprogramDetails>()}) {
-      if (subpDetails->isFunction()) {
-        return &subpDetails->result();
-      }
-    }
-  }
-  return nullptr;
-}
-
 const Symbol *FindOverriddenBinding(const Symbol &symbol) {
   if (symbol.has<ProcBindingDetails>()) {
     if (const DeclTypeSpec * parentType{FindParentTypeSpec(symbol.owner())}) {