(Sorry, I probably did already ask something similar before, but I cannot recall it easily)
First, I don't understand what precisely is in the /usr/local/include/llvm/Support/ directory
In particular, it seems to me that nothing in the documentation says that MemoryBuffer.h in inside it....
I'm quite annoyed to understand what exactly is the public interface to LLVM!
The doxygen documentation does not help: some classes or includes are conceptually private to the LLVM implementation, i.e. not available in /usr/local/include/ after a standard installation
May I suggest to add (progressively) into the LLVM doxygen-ed documentation some conventional comments to explain that such & such stuff is private to the implementation, or available to users after a standard installation (and without any tweaking of LLVM sources!)
I want to store modules inside non-files, for example inside GDBM entries (or inside MySQL databases). Apparently, I can read a module from a GDBM store with something like (all error handling is skipped)
datum keyd, vald; // GDBM key & value
// fill keyd appropriately
vald = gdbm_fetch (bark_gdbm, keyd);
MemoryBuffer* membuf = MemoryBuffer::getMemBuffer(vald.dptr,
Module* lmodu = ParseBitcodeFile(membuf, &errmsg);
// do something appropriate with the llvm module lmodu
Unfortunately, there is no way of dumping into memory, except by going thru a stdc++ memory output buffer. Or am I wrong on this?
Regards, and thanks for your patience & reading.