[LLVMdev] MemoryBuffer C Bindings - LLVMCreateMemoryBufferWithArray

Duncan Sands baldrick at free.fr
Sun Dec 16 07:27:00 PST 2012

On 14/12/12 11:06, Moritz Maxeiner wrote:
> I would like to use the LLVM-C bindings to provide LLVM access with an OO-design
> in another language (D), e.g. map from the C API back up to
> a D API that closely resembles the original C++ API.
> Since I would like to have D (with its own exception system) to handle
> the IO, I need a new C API function (unless there is one and I haven't found it):
> LLVMBool LLVMCreateMemoryBufferWithArray(const char* Array, char** OutMessage)
> As the name suggests, create a MemoryBuffer for use with LLVMParseBitcode so
> that one can parse bitcode already present in memory (e.g. use D's capibilities for
> loading files with its own exception system present, so it doesn't have to be
> delegated down to LLVM).
> I would write this myself, of course, but I'm wondering how the procedure for
> getting code accepted to LLVM is.

Write a patch with a test-case and send it to the llvm-commits mailing list.

Ciao, Duncan.

More information about the llvm-dev mailing list