MCPcopy Create free account
hub / github.com/digego/extempore / llvm_get_function_ptr

Function llvm_get_function_ptr

src/EXTLLVM.cpp:614–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612}
613
614void* llvm_get_function_ptr(char* fname)
615{
616 //using namespace llvm;
617 // llvm::Module* M = extemp::EXTLLVM::I()->M;
618 // llvm::Function* func = M->getFunction(std::string(fname));
619 llvm::Function* func = extemp::EXTLLVM::I()->getFunction(std::string(fname));
620 if(func == 0) {
621 // throw std::runtime_error("Extempore runtime error: error retrieving function in llvm_get_function_ptr");
622 return NULL;
623 }
624
625 void* p = extemp::EXTLLVM::I()->EE->getPointerToFunction(func);
626
627 // if(p==NULL) {
628 // throw std::runtime_error("Extempore runtime error: null ptr retrieving function ptr in llvm_get_function_ptr");
629 // }
630 return p;
631}
632
633char* extitoa(int64_t val) {
634 /*

Callers

nothing calls this directly

Calls 1

getFunctionMethod · 0.80

Tested by

no test coverage detected