MemoryBuffer C Bindings - LLVMCreateMemoryBufferWithArray

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.

Thank you for reading,
     Moritz Maxeiner

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

Ciao, Duncan.