[LLVMdev] MemoryBuffer C Bindings - LLVMCreateMemoryBufferWithArray

Moritz Maxeiner moritzmaxeiner at googlemail.com
Fri Dec 14 02:06:48 PST 2012

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** 

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

More information about the llvm-dev mailing list