[LLVMdev] How to implement list in llvm
Tim Northover
t.p.northover at gmail.com
Fri Apr 19 08:19:54 PDT 2013
> In my compiler I want to give user a list of user defined classes. I tried
> to use generated bitcode of my own wrapper of std::vector, but there is no
> possibility to generate bitcode of template, so I finally build it with
> std::vector<void*>.
Does this mean you wrote a wrapper around std::vector, generated LLVM
IR for it, and then inserted this IR into your compiled code in some
manner?
> Do you know about any better solutions how to build such
> a type with llvm? Maybe there is a llvm built in type that is better choice
> than external c++ wrapper?
If I understand what you're doing, there's no generic LLVM
implementation of any complex datatypes for front-ends to use. Each
one is expected to implement its own requirements.
In principle, some kind of library could be developed, of course.
Tim
More information about the llvm-dev
mailing list