Fix #include broken by iMemory.h not including DerivedTypes.h
[oota-llvm.git] / lib / ExecutionEngine / Interpreter / Support.cpp
index ca89ae33332cc061126fb58dac0cc746eeea54f7..aa97621214a1cb4bb7ff0086f973ce6b57382e45 100644 (file)
@@ -14,9 +14,9 @@ using std::cout;
 //
 // LookupMatchingNames helper - Search a symbol table for values matching Name.
 //
-static inline void LookupMatchingNames(const std::string &Name,SymTabValue &STV,
+static inline void LookupMatchingNames(const std::string &Name,
+                                       SymbolTable *SymTab,
                                       std::vector<Value*> &Results) {
-  SymbolTable *SymTab = STV.getSymbolTable();
   if (SymTab == 0) return;                         // No symbolic values :(
 
   // Loop over all of the type planes in the symbol table...
@@ -31,17 +31,17 @@ static inline void LookupMatchingNames(const std::string &Name,SymTabValue &STV,
   }
 }
 
-// LookupMatchingNames - Search the current method namespace, then the global
+// LookupMatchingNames - Search the current function namespace, then the global
 // namespace looking for values that match the specified name.  Return ALL
 // matches to that name.  This is obviously slow, and should only be used for
 // user interaction.
 //
 std::vector<Value*> Interpreter::LookupMatchingNames(const std::string &Name) {
   std::vector<Value*> Results;
-  Method *CurMeth = getCurrentMethod();
+  Function *CurMeth = getCurrentMethod();
   
-  if (CurMeth) ::LookupMatchingNames(Name, *CurMeth, Results);
-  if (CurMod ) ::LookupMatchingNames(Name, *CurMod , Results);
+  if (CurMeth) ::LookupMatchingNames(Name, CurMeth->getSymbolTable(), Results);
+  if (CurMod ) ::LookupMatchingNames(Name, CurMod ->getSymbolTable(), Results);
   return Results;
 }