Displaying 1 result from an estimated 1 matches for "externalfn".
2019 Jan 02
2
JIT compiler, Windows, external functions like cos
...but not for “cos”. It just
encapsulates an external call. We use
Microsoft Visual Studio 2017 Version 15.9.4.
LLVM 7.0.1
Solution Configuration: Debug, 32 Bit, Switch: /MTd
using namespace llvm;
typedef double(__cdecl *JitCompiledFn)(double);
int main()
{
// "sqrt" works.
//const char externalFnName[] = "sqrt";
// "cos", "sin", etc. fails.
const char externalFnName[] = "cos";
InitializeNativeTarget();
InitializeNativeTargetAsmPrinter();
InitializeNativeTargetAsmParser();
LLVMContext context;
IRBuilder<> builder(context);
std::unique_ptr<...