diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-07 20:49:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-07 20:49:59 +0000 |
commit | 2fbfdcffd3e0cf41422aaa6c526c37cb02b81341 (patch) | |
tree | c1991eac5d23807b38e5909f861609b243562f70 /lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | |
parent | dcc6d4cada290857ee74164816ec3c502c1db7a4 (diff) |
Change references to the Method class to be references to the Function
class. The Method class is obsolete (renamed) and all references to it
are being converted over to Function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp')
-rw-r--r-- | lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index c8aa46a186..8f486e84ce 100644 --- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -1,11 +1,12 @@ -//===-- ExternalMethods.cpp - Implement External Functions ----------------===// +//===-- ExternalFunctions.cpp - Implement External Functions --------------===// // -// This file contains both code to deal with invoking "external" methods, but -// also contains code that implements "exported" external methods. +// This file contains both code to deal with invoking "external" functions, but +// also contains code that implements "exported" external functions. // -// External methods in LLI are implemented by dlopen'ing the lli executable and -// using dlsym to look op the methods that we want to invoke. If a method is -// found, then the arguments are mangled and passed in to the function call. +// External functions in LLI are implemented by dlopen'ing the lli executable +// and using dlsym to look op the functions that we want to invoke. If a +// function is found, then the arguments are mangled and passed in to the +// function call. // //===----------------------------------------------------------------------===// @@ -91,18 +92,19 @@ GenericValue Interpreter::callExternalMethod(Function *M, const vector<GenericValue> &ArgVals) { TheInterpreter = this; - // Do a lookup to see if the method is in our cache... this should just be a + // Do a lookup to see if the function is in our cache... this should just be a // defered annotation! std::map<const Function *, ExFunc>::iterator FI = Functions.find(M); ExFunc Fn = (FI == Functions.end()) ? lookupFunction(M) : FI->second; if (Fn == 0) { - cout << "Tried to execute an unknown external method: " + cout << "Tried to execute an unknown external function: " << M->getType()->getDescription() << " " << M->getName() << "\n"; return GenericValue(); } // TODO: FIXME when types are not const! - GenericValue Result = Fn(const_cast<FunctionType*>(M->getFunctionType()),ArgVals); + GenericValue Result = Fn(const_cast<FunctionType*>(M->getFunctionType()), + ArgVals); return Result; } |