mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-12 14:06:36 +00:00
A small re-factored JIT/MCJIT::getPointerToNamedFunction(), so it could be called with the base class.
llvm-svn: 147610
This commit is contained in:
parent
53d6e3b9d3
commit
234aa2c4ea
@ -228,6 +228,17 @@ public:
|
||||
virtual GenericValue runFunction(Function *F,
|
||||
const std::vector<GenericValue> &ArgValues) = 0;
|
||||
|
||||
/// getPointerToNamedFunction - This method returns the address of the
|
||||
/// specified function by using the dlsym function call. As such it is only
|
||||
/// useful for resolving library symbols, not code generated symbols.
|
||||
///
|
||||
/// If AbortOnFailure is false and no function with the given name is
|
||||
/// found, this function silently returns a null pointer. Otherwise,
|
||||
/// it prints a message to stderr and aborts.
|
||||
///
|
||||
virtual void *getPointerToNamedFunction(const std::string &Name,
|
||||
bool AbortOnFailure = true) = 0;
|
||||
|
||||
/// runStaticConstructorsDestructors - This method is used to execute all of
|
||||
/// the static constructors or destructors for a program.
|
||||
///
|
||||
|
@ -115,6 +115,12 @@ public:
|
||||
virtual GenericValue runFunction(Function *F,
|
||||
const std::vector<GenericValue> &ArgValues);
|
||||
|
||||
virtual void *getPointerToNamedFunction(const std::string &Name,
|
||||
bool AbortOnFailure = true) {
|
||||
// FIXME: not implemented.
|
||||
return 0;
|
||||
};
|
||||
|
||||
/// recompileAndRelinkFunction - For the interpreter, functions are always
|
||||
/// up-to-date.
|
||||
///
|
||||
|
@ -124,8 +124,8 @@ public:
|
||||
/// found, this function silently returns a null pointer. Otherwise,
|
||||
/// it prints a message to stderr and aborts.
|
||||
///
|
||||
void *getPointerToNamedFunction(const std::string &Name,
|
||||
bool AbortOnFailure = true);
|
||||
virtual void *getPointerToNamedFunction(const std::string &Name,
|
||||
bool AbortOnFailure = true);
|
||||
|
||||
// CompilationCallback - Invoked the first time that a call site is found,
|
||||
// which causes lazy compilation of the target function.
|
||||
|
@ -65,8 +65,8 @@ public:
|
||||
/// found, this function silently returns a null pointer. Otherwise,
|
||||
/// it prints a message to stderr and aborts.
|
||||
///
|
||||
void *getPointerToNamedFunction(const std::string &Name,
|
||||
bool AbortOnFailure = true);
|
||||
virtual void *getPointerToNamedFunction(const std::string &Name,
|
||||
bool AbortOnFailure = true);
|
||||
/// @}
|
||||
/// @name (Private) Registration Interfaces
|
||||
/// @{
|
||||
|
Loading…
Reference in New Issue
Block a user