ORC JIT compilation - can I recover the size of the generated function?


Is there a way to obtain the length of the generated function?
It’s easy to obtain a pointer to a compiled function using ORC (of course).

I’ve recently implemented a disassembler in our Common Lisp compiler (github.com/drmeister/clasp).
I’d like to be able to say (disassemble ‘foo) and get the complete disassembly of the function ‘foo.
Currently, I don’t know when to stop disassembling.


Christian Schafmeister
Professor, Chemistry
Temple University

LLVM provides a function for you:
auto symbols = llvm::object::computeSymbolSizes(object);