| 612 | } |
| 613 | |
| 614 | void* 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 | |
| 633 | char* extitoa(int64_t val) { |
| 634 | /* |
nothing calls this directly
no test coverage detected