[LLVMdev] C Types -> LLVM Objects

Evan Jones ejones at uwaterloo.ca
Sun Oct 30 20:23:18 PST 2005


I am implementing the support library for my toy Python implementation 
in C. Is there a recommended way to import types/functions defined in 
my C library as LLVM type objects into my compiler? I am currently 
doing this:

- Create a "null" C file that references the important types
- Load the bytecode of this file when initializing the compiler
- Load the types and functions out of this "null" module

I'm thinking that a better solution would be to write some tool that 
takes the "null" bytecode and outputs a C++ file so I don't need to 
link my compiler with the bytecode reader, or be able to find the 
"nullmodule.bc" file. Are there any better ways to do this?

Thanks,

Evan Jones

--
Evan Jones
http://evanjones.ca/




More information about the llvm-dev mailing list