Skip to content

Instantly share code, notes, and snippets.

@ishikawa
Created May 10, 2014 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ishikawa/9b1c002dab494b455993 to your computer and use it in GitHub Desktop.
Save ishikawa/9b1c002dab494b455993 to your computer and use it in GitHub Desktop.
# LLVM::JITCompiler#run_function can't handle aggregate value
engine = LLVM::JITCompiler.new(module)
function = module.functions["doSomething"]
pointer = engine.pointer_to_global(function)
fn = FFI::Function.new(:int, [:int], pointer)
fn.call(123)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment