Basile STARYNKEVITCH
2007-Dec-02 18:46 UTC
[LLVMdev] reading & writing bitcode from non file, e.g. GDBM store (or MySQL database)
Hello All, (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, vald.dptr+vald.dsize, bufnam); 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. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} ***
Gordon Henriksen
2007-Dec-02 19:14 UTC
[LLVMdev] reading & writing bitcode from non file, e.g. GDBM store (or MySQL database)
On Dec 2, 2007, at 13:46, Basile STARYNKEVITCH wrote:> 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 installationThat is a bit frustrating. If a symbol is defined under "include/ llvm", then it is public (installed). If it comes from "lib" someplace, then it is private (not installed). doxygen includes this information on some pages [1]. Reading the headers directly might make it clearer. The doxygen documentation is complimentary to the documentation in prose [2], so you might look there first.> 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) > ... > Unfortunately, there is no way of dumping into memory, except by > going thru a stdc++ memory output buffer. Or am I wrong on this?I think you've answered your own question! — Gordon [1] Like here, right at the top: http://llvm.org/doxygen/Type_8h.html [2] http://llvm.org/docs/ etc., especially http://llvm.org/docs/ProgrammersManual.html
Apparently Analagous Threads
- [LLVMdev] Instantiating modules from .bc files
- [LLVMdev] How to get a return type of a function with LLVM-C API
- CEBA-2012:0579 CentOS 5 gdbm FASTTRACK Update
- CEBA-2015:0005 CentOS 6 gdbm FASTTRACK BugFix Update
- CEBA-2015:0089 CentOS 6 gdbm FASTTRACK BugFix Update