Skip to content

Commit

Permalink
Add jl_function_ptr_by_llvm_name
Browse files Browse the repository at this point in the history
Useful with the _ir and _asm dump functions to trace through a call path
without figuring out all of the necessary Julia signatures.
  • Loading branch information
ihnorton committed Apr 5, 2015
1 parent 996c3f6 commit 47f55f0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,12 @@ void *jl_function_ptr(jl_function_t *f, jl_value_t *rt, jl_value_t *argt)
#endif
}


extern "C" DLLEXPORT
void *jl_function_ptr_by_llvm_name(char* name) {
return (void*)(intptr_t)jl_ExecutionEngine->FindFunctionNamed(name);
}

// export a C-callable entry point for a function, with a given name
extern "C" DLLEXPORT
void jl_extern_c(jl_function_t *f, jl_value_t *rt, jl_value_t *argt, char *name)
Expand Down

0 comments on commit 47f55f0

Please sign in to comment.