[LLVMdev] reading a module from a memory string (BitCode)
Basile STARYNKEVITCH
basile at starynkevitch.net
Sun May 13 13:20:48 PDT 2007
Le Sat, May 12, 2007 at 04:42:49PM -0700, Chris Lattner écrivait/wrote:
> On Sat, 12 May 2007, Basile STARYNKEVITCH wrote:
> > with the latest LLVM (almost 2.0 CVS) what is the right way to read a module
> > from a byte array fetched from a database?
>
> The bitcode reader will read from any MemoryBuffer object. There are a
> variety of static methods on MemoryBuffer to create them from files,
> stdio, and memory. If your buffer is in memory, just create a
> memorybuffer and pass in the range of bytes already in memory. Once the
> appropriate MemoryBuffer is created, you load it like any other bitcode
> stream.
Apparently BitcodeReader.h is only in lib/Bitcode/Reader/ but not in
include, so a make install does not install it.
Is it supposed to be accessible from applications? How exactly? I feel that
some install rule is missing; after a sudo make install,
grep -rn BitcodeReader /usr/local/include/llvm/
don't find any occurrence! Is this a bug or a misunderstanding of mine?
Can I assume the bytecode interface is obsolete and to be replaced by bitcode?
BTW, my hoobby project is an hypertextual programming language experiment
with only a Web interface (no source files). So I want to store every
procuced llbm Module in a MySQL database.
Regards
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faïencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***
More information about the llvm-dev
mailing list