[LLVMdev] C Binding Question: LLVMCreateExecutionEngineForModule takes a char**

Hayden Livingston halivingston at gmail.com
Fri Feb 13 09:49:17 PST 2015


I was wondering if the usage of char** in LLVM C bindings mostly for
outMessages is designed correctly as a C function interface.

It's unclear if the buffer should be caller-allocated or callee-allocated.
If it's caller-allocated, how does the caller know how big the buffer to be?

But if it's callee-allocated, how does one dispose the memory?

Maybe I'm missing a piece of documentation, but it either seems a design
flaw, or we're sticking with it for backward compat reasons?

Hayden
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150213/27ae411d/attachment.html>


More information about the llvm-dev mailing list