[LLVMdev] Scheme + LLVM JIT

Alexander Friedman alex at inga.mit.edu
Wed May 18 14:48:07 PDT 2005


On May 16, Chris Lattner wrote:
> 
> Sure, that sounds good.  I'd definitely prefer that it be tested before it 
> goes into CVS.  Perhaps adding something to llvm/examples would be a good 
> way to go.
> 
> One suggestion, you might change the API to be something like this:
> 
> ParseAsmString(const char *, Module *)
> 
> Where the function parses the string and appends it into the specified 
> module.  This would make self-extending code simpler (no need to parse 
> into one module then link into the preexisting one).


Ok, here is the new and improved patch for parsing asm strings, with
the modifiacations you requested.

It is now also tested.

As for the actuall testing, here is what I have so far:

I have a CWrapper, which contains the c/c++ header file that is used
both by the wrapper and it's clients, a .cpp file, and a makefile,
that depends on another patch i submitted. It builds a large shared
object (though the linker complains about linking non-libtool
libraries into a shared lib - any ideas on that?).

The question is: should this CWrapper go into examples/ or should it
be a more integral part of llvm? The .h file would then be in some
include/ subdirectory.

I also have a little example file that uses the CWrapper, and
indirectly tests the asm parser. This should probably be an example,
but i'm not sure how to set up the makefile.  I'll attach everything
for now - let me know what to change.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: current_cvs.diff
Type: application/octet-stream
Size: 8906 bytes
Desc: cvs
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050518/496410a6/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: interface-example.c
Type: application/octet-stream
Size: 2496 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050518/496410a6/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cwrapper.tgz
Type: application/octet-stream
Size: 1412 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050518/496410a6/attachment-0002.obj>
-------------- next part --------------


-- 


-Alex


More information about the llvm-dev mailing list